If you've previously installed gulp globally, run npm rm --global gulp before following these instructions. For more information, read this Sip.
Make sure that you've installed Node and npm before attempting to install gulp.
node --versionnpm --versionnpm install --global gulp-cliIf you don't have a package.json, create one. If you need help, run an npm init which will walk you through giving it a name, version, description, etc.
Run this command in your project directory:
npm install --save-dev gulpIn your project directory, create a file named gulpfile.js in your project root with these contents:
var gulp = require('gulp');
gulp.task('default', function() {
// place code for your default task here
});Run the gulp command in your project directory:
gulpTo run multiple tasks, you can use gulp <task> <othertask>.
Voila! The default task will run and do nothing.
Using gulpfile ~/my-project/gulpfile.js
[11:15:51] Starting 'default'...
[11:15:51] Finished 'default' after 103 μs- API Documentation - The programming interface, defined
- Recipes - Specific examples from the community
- In Depth Help - A tutorial from the the guy who wrote the book
- Plugins - Building blocks for your gulp file