Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.43 KB

getting-started.md

File metadata and controls

65 lines (42 loc) · 1.43 KB

Getting Started

If you've previously installed gulp globally, run npm rm --global gulp before following these instructions.

Check for Node and npm

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

node --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

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

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

Where do I go now?