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!
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.
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?
I agree that async APIs are almost mandatory in the context of servers (since you don't want to block them while you run I/O commands).
But for shell scripts, not so much. In fact, async would just introduce unnecessary complexity, in particular a nested callback hell as most shell scripts are basically sequences of I/O commands (promises, etc would mitigate the problem somewhat, but again at the expense of another layer of complexity).
That being said... if there's enough demand to use these commands within web servers, adding callback support should be easy. Contributions are welcome! :)
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).
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!