Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.69 KB

File metadata and controls

70 lines (47 loc) · 1.69 KB

Getting Started

If you've previously installed gulp globally, run npm rm --global gulp before following these instructions. For more information, read this Sip.

Check for Node and npm

Make sure that you've installed Node and npm before attempting to install gulp.

node --version
npm --version

Install the gulp command

npm install --global gulp-cli

Create a package.json

If 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.

Install gulp in your devDependencies

Run this command in your project directory:

npm install --save-dev gulp

Create a gulpfile

In 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
});

Test it out

Run the gulp command in your project directory:

gulp

To run multiple tasks, you can use gulp <task> <othertask>.

Result

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

Where do I go now?