First of all, we need to set up the Gulp, so follow the steps listed next:
Install
npm
:$ npm init
Install Bower:
$ npm install bower –g
Install Gulp:
$ npm install gulp
This last command will install Gulp locally to the project.
Now, we need to install the Gulp plugins to achieve the tasks locally.
Install all necessary Gulp plugins:
$ npm install gulp-ruby-sass gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-notify gulp-cache gulp-rename del --save-dev
Create
gulpfile.js,
and load the plugins:var gulp = require('gulp'), sass = require('gulp-ruby-sass'), cssnano = require('gulp-cssnano'), jshint = require('gulp-jshint'), uglify = require('gulp-uglify'), concat = require('gulp-concat'), notify = require('gulp-notify'), rename = require('gulp-rename'), cache = require('gulp-cache'), del = require('del');
Create Gulp tasks for SASS and JS:
gulp.task('styles', function() { return sass('assets/scss/main.scss', { style: 'expanded' }) .pipe(gulp...