Npm Scripts vs Task Runners
January 5, 2016
There were some posts a while back that talked about using npm scripts to handle most of your mundane tasks over using a task manager. I only recently got around to diving into this concept and wanted to share some of my discoveries.Why use task runners at all?This is an easy one. In development, there are things that have to get run and rerun constantly. Make a change to your javascript? Recompile (if you’re using webpack, browserify, babel, etc.). Make a change to your sass/less? Recompile. Want to release your code? Bundle, minify, copy assets, distribute. Lint your code? Run eslint or jshint or jscs.For example, to compile some code via webpack for development could look like webpack -d --progress --colors. Granted, it could be just webpack -d but I like the extra niceties. More realistically, you might have multiple…