Setting up Gulp
The first thing we need to do to use Gulp in our project is install it in our dev-dependencies. We do this using npm
install:
npm install --save-dev gulp
Once gulp is installed, our next step is changing our package.json file so our main
script is gulpfile.js instead of index.js:
// mastering-sass-swag/package.json "main": "gulpfile.js",
We're going to delete our config.rb file. Surprised? We'll, we're not going to be running commands like compass watch
or compass compile
so we won't need the config.rb file. Instead we're going to do everything from this point on through Gulp. So keeping config.rb would just confuse things:
rm config.rb
We can also delete index.js
at this point for the same reasons:
rm index.js
Next we need to create the gulpfile.js where we will add all of our Gulp tasks. Create a file gulpfile.js in the root of our project, and inside add the following:
// mastering-sass-swag/gulpfile.js 'use strict'; var gulp = require('gulp'); &...