Gulp, NPM and Node – What are they?

“NPM is a package manager. You use it to install Javascript tools that make life easier.”

“Gulp is a toolkit for automating painful or time-consuming tasks in your development workflow, so you can stop messing around and build something.”

Example:

I downloaded the Understrap Theme for WordPress. I wanted to figure out how to update a SASS file that would, in turn, update a bunch of other SASS files that would then output CSS files that would be useful to me. So I:

  1. Installed node.js (an EXE application). When I did so, I installed the optional NPM package manager.
  2. Ran node.js, which brings up a command line window.
  3. Used the node command line to install gulp using the NPM package manager.
  4. Went to my Understrap directory and ran “gulp watch” from the node command line. This loaded a file called “gulpfile.js” that was already in the theme folder. Gulp started, loaded “gulpfile.js” and then started started listening for SASS changes.
  5. Changed my SASS files. When I changed the “master” SASS file, it magically did some stuff and added new CSS files.

Google sums up Gulp well:

“Modern web development has many repetitive tasks like running a local server, minifying code, optimizing images, preprocessing CSS and more. This text discussesĀ gulp, a build tool for automating these tasks.”