NPM Build Script Boilerplate

I thought I would share my build script that uses NPM tasks to compile sass, javascript and optimise images and live reload the browser. Made for Mac but with a few tweaks it can be made to work on other systems. Namely slight differences in syntax on Windows (you could run this more easily via the new Ubunutu terminal in Windows 10) and swapping imageoptim for imagemin on linux and windows.

This is an alternative to Gulp or Grunt. I built this because I got tired of maintaining a 1,200 line Gulp pipeline. This script does the same job in about 20 lines with far less dependencies.

Hope it’s useful for some peeps.

1 Like