Gulp requires Node.js and NPM, Node's package manager. Most installers include NPM with Node.js. Refer to the installation documentation or confirm it is already installed by running the following command in your terminal,
npm -v
// will return NPM version or error saying command not found
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
$ npm init
$ npm install --save-dev gulp
var gulp = require('gulp');
gulp.task('default', function() {
// place code for your default task here
});
$ gulp
The default task will run and do nothing.
To run individual tasks, use gulp <task> <othertask>
.