Creating the Building tasks

Now is the time to create our task using only NPM.

Before we begin, it is important to keep in mind that NPM has two special commands that are invoked directly, start and test. So we will use the run command to run all the other tasks we create.

Our goals in this section are to:

  • Copy some files from the source directory to the client directory
  • Verify errors in JavaScript files
  • Compile SASS files from src/scss and save them in the client/css folder
  • Optimize images from src/images/gallery to client/images/gallery
  • Concatenate JavaScript files from src/scripts to client/js/scripts

Installing the dependencies

To accomplish these tasks, we need to install some Command Line Interface (CLI) tools:

  1. Open the terminal/shell and type the ...

Get Node.js 6.x Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.