-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mention npm run
in the shell scripts section
#22
Comments
👍
I fully agree. While the motive behind this title is clearly the organically grown, unmaintainable 5k shell script that most of us have either seen or written at some point, it should be made clear that there are indeed benefits of piecing together your processing pipeline on the OS level (ie. STDIN/STDOUT) as opposed to the node level and shell scripts aren't inherently bad. |
👍 It's worth mentioning |
👍 definitely, I use it a lot, and works great for simple things. |
Sounds great! |
I personally vote for having this content explicitly called out in the book.
A short chapter makes more since since |
A strong 👍. I would love to see a chapter on |
👍 |
I just wanted to follow up on this section. We currently have authors working on chapters for other tools but haven't got a committed author for the |
@addyosmani: I'd be happy to put together a 1-2 pager for |
@wilmoore still interested? :) |
Sure...I'm still up for it. I can probably start working on it next week given I'm heads-down preparing for a BETA release this week. |
I've made an initial crack at documenting |
Thanks @wilmoore! |
For the
Modern tools vs Shell scripts
section,npm run
deserves a mention since it gives you many of the benefits of shell scripts without all the up-front configuration that many of the other tools require. Here's the article I wrote about usingnpm run
with the package.jsonscripts
field: task automation with npm run.Augmented with other narrowly focused tools on npm, you can get a lot done. Here's another example that uses catw and watchify to watch and rebuild less and javascript whenever a file changes.
The biggest benefit to this shell-oriented way of organizing things is that you don't need up-front coordination among the tool authors, so it's much easier to integrate pieces that have already been written that can read and write to stdin and stdout rather than having to write a
grunt-*
orgulp-*
plugin to wrap the functionality manually. You're much more free to recombine the pieces in novel ways and to add components piecemeal. The downside is that there is a learning curve if you don't already know bash and it can take time to discover which tools you really like and fit your mental model and standard approaches well. This is also true of integrated solutions but there is more prescription about which tools are the "best" which I personally dislike because I so often disagree with those prescriptions.I think "modern tools vs shell scripts" is perhaps not the right way to phrase the dialectic here. It's more about vertically-integrated tools versus more horizontally-oriented tools, or
top-down vs bottom-up
orcentralized vs decentralized
orintegrated tooling vs unix
. It's the same thing as [chaotic vs lawful alignment](http://annex.wikia.com/wiki/Alignment_(Dungeons_%26_Dragons%29).The text was updated successfully, but these errors were encountered: