1: Install gulp globally:
If you have previously installed a version of gulp globally, please run npm rm --global gulp
to make sure your old version doesn’t collide with gulp-cli.
$ npm install –global gulp-cli
2: Initialize your project directory:
$ npm init
3: Install gulp in your project devDependencies:
$ npm install --save-dev gulp
4: Create a gulpfile.js
at the root of your project:
var gulp = require('gulp');
gulp.task('default', function() {
// place code for your default task here
});
5. Run gulp:
$ gulp
The default task will run and do nothing.
To run individual tasks, use gulp <task> <othertask>
.
Leave a Reply