15.7 Summary
Whenever you’re faced with a problem you need to solve with a shell script, you can use Node.js. Especially when it comes to implementing solutions for automating tasks in the web environment, Node.js comes in handy. Many existing tools such as various CSS preprocessors, JavaScript optimizers, and HTML parsers show how processing web standards on the command line can work with Node.js.
You don’t even have to look at such a Node.js command-line tool to know that it’s a JavaScript application. Thus, such tools behave like the native commands. You can pass arguments and options to your Node.js application. For parsing the command line, you should use one of the available libraries such as Commander. As everywhere, the principle ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access