ShellJS: A port of Unix shell commands to Node.js
github.com
github.com
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!
Coincidentally, it's nice to see JavaScript being used for a much larger variety of tasks. I think it's a very underrated language.
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! :)