Installing gulp and its dependencies

The procedure to install gulp and its dependencies is provided in this topic.

About this task

The procedure to install gulp and its dependencies described in this topic is applicable to windows environment. If you are working on a different operating system, then you need to download the appropriate binaries, change the commands, and directory paths accordingly.

Procedure

  1. Download Node.js v6.11.2 from either of the two links:
  2. Install or extract the zip to a folder. For example: C:\NodeJS.
  3. Update the following environment variables in case of Windows (However, for Linux, update the Bash profile or PATH or other variables that you prefer).
    • Define a new variable NODE_HOME and provide the path where Node.js is installed. For example, C:\NodeJS.
    • Update the PATH (or Path) environment variable by adding the content in quotes at end: ";%NODE_HOME%"
      Note: On Linux, you need to append /bin folder as well: $NODE_HOME/bin
    • Ensure that no other gulp or npm folders are present in your PATH environment variable.
  4. Open command line with administrator privileges and navigate to the directory where Node.js is installed. For example, C:\NodeJS and then run the following command: npm install -g gulp@v3.9.0. This installs gulp.
  5. Create a folder <STORE_BUILD_FOLDER>. For example, C:\StoreBuild.
  6. Copy the gulp files from <RUNTIME>/nodebuild/wsc/ to <STORE_BUILD_FOLDER>.
  7. From the command line, navigate to the <STORE_BUILD_FOLDER> folder with the cd <STORE_BUILD_FOLDER> command.
  8. Run the - npm update command to install all the node.js related packages that enable minification.