Install gulp locally

To install gulp with sass locally, run the following commands in the app folder:

  • npm install gulp-cli
  • npm install gulp
  • npm install gulp-sass
  • npm install gulp-sourcemaps

 

Install gulp globally

Because we often work on network paths, it is not feasible to run from a local node_modules folder. Getting a thousands of files over a network path just takes too long. This is why at 2sic, we install gulp globally to speed up the process (this is also the reason why we do not add gulp, gulp-sass etc. to the dependencies list in the package.json of our apps).

To install gulp globally, run the following commands. The first two lines make sure that node finds the global packages when running gulp from the local folder.

  • setx NODE_PATH "%AppData%\npm\node_modules"
  • setx -m NODE_PATH "%AppData%\npm\node_modules"
  • npm install -g gulp-cli
  • npm install -g gulp
  • npm install -g gulp-sass
  • npm install -g gulp-sourcemaps