

ShellJS: A port of Unix shell commands to Node.js - arturadib
https://github.com/arturadib/shelljs

======
arturadib
OP here.

At Mozilla's PDF.js project we have a large Makefile responsible for
everything from custom-bundling our .js files to building our Firefox addon
extension and firing up a localhost server.

ShellJS is part of our effort to minimize our dependencies, particularly on
Unix commands so as to offer homogenous support to our Windows users. It
should also be of use to folks who want to do traditional shell scripting on
multiple platforms using JavaScript and a familiar syntax - no need to learn
another library. All commands are synchronous, including exec().

We're looking for early adopters and contributors who can help us mature the
code. Thanks!

~~~
Game_Ender
Why did you decide to go with this instead of a cross platform scripting
language like Python, Ruby, or Perl? In both cases you need a custom runtime
compiled from C or C++ code.

~~~
arturadib
PDF.js is a JavaScript project - that's the language we know for sure all our
contributors speak :)

------
ZitchDog
I don't see any callbacks here, which is nice, but doesn't really fit the Node
execution model. Do the commands block? Are they queued and executed
asynchronously?

~~~
darklajid
The documentation explicitly says that every call is blocking unless stated
otherwise.

~~~
ZitchDog
I see that now, thanks. I did a quick scan of the doc and didn't see it as
it's a little buried.

------
drats
Very nice, this reminds me of a similar python project.

<https://github.com/amoffat/pbs>

~~~
arturadib
Yep, similar in spirit but PBS is a wrapper around existing shell commands,
whereas ShellJS implements those commands on top of the Node API (which makes
the commands portable/cross-platform).

------
wickedchicken
;_;

------
funthree
procstreams is also pretty cool

<https://github.com/polotek/procstreams>

