O'Reilly logo

Node.js 6.x Blueprints by Fernando Monteiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required