There is a large amount of stuff to know before you can develop and debug the piping stuff in gulp, I grant you that.
But, what are you going to wind up using in npm scripts for your resource compiling? Webpack? Browserify?
Why not put that all into a gulp file? Gulp files are great for non-piping-streaming tasks. It has great support for chaining tasks and making tasks dependent upon others.
What benefit do I get by actually moving to npm scripts, that I couldn't have in a gulp file?
As he states in the article: sometimes gulp plugins are not updated to support new versions of libraries, resulting in developers being stuck on old versions of tools. There's also a risk that the plugin contains bugs, in which case you can either fix them yourself or wait for the plugin maintainer(s) to do it. Both of those alternatives takes time, energy and focus from your main project, which makes it a good thing to avoid if possible.
The move to npm scripts is such a regressive fashion choice in the frontend world. Which of the following sounds better?
- Write your build with the full power of the language you use everyday and orchestrate it with a thin layer like Gulp
- Write uncommented (and uncomment-able) bash scripts where parallelism, streaming, and cross-platform compatibility require nontrivial effort
Gulp isn't as complicated as some have insinuated. You don't even need to use Gulp plugins if that's a concern–it's just Node!
I'd much rather write Javascript to build Javascript than memorize CLI arguments and break all of my scripts on Windows.
I will say that the best part of npm scripts is that they're not Grunt :)
6 comments
[ 3.1 ms ] story [ 24.9 ms ] threadBut, what are you going to wind up using in npm scripts for your resource compiling? Webpack? Browserify?
Why not put that all into a gulp file? Gulp files are great for non-piping-streaming tasks. It has great support for chaining tasks and making tasks dependent upon others.
What benefit do I get by actually moving to npm scripts, that I couldn't have in a gulp file?
Where is the risk there?
- Write your build with the full power of the language you use everyday and orchestrate it with a thin layer like Gulp - Write uncommented (and uncomment-able) bash scripts where parallelism, streaming, and cross-platform compatibility require nontrivial effort
Gulp isn't as complicated as some have insinuated. You don't even need to use Gulp plugins if that's a concern–it's just Node!
I'd much rather write Javascript to build Javascript than memorize CLI arguments and break all of my scripts on Windows.
I will say that the best part of npm scripts is that they're not Grunt :)