1. Install gulp globally
$npm install --global gulp
2. Install gulp in project devDependencies
$npm install --save-dev gulp
3. Create a gulpfile.js
at the root of project
var gulp = require('gulp');
gulp.task('default', function() {
console.log('this is the default task');
});
4. Run gulp
$gulp
(outputs):
'this is the default task'
gulp.task(name, [, dep], fn)
gulp.task('js', ['jscs', 'jshint'], function() {
return gulp
.src('./src/**/*.js')
.pipe(concat('all.js')
.pipe(uglify())
.pipe(gulp.dest('./build/'));
});
Dependency tasks run in parallel, not in sequence
Brackets Extensions