The streaming build system
The streaming build system
For a Getting started guide, API docs, recipes, making a plugin, etc. check out or docs!
gulpfile.js
This file will give you a taste of what gulp does.
var gulp = require'gulp';var coffee = require'gulp-coffee';var concat = require'gulp-concat';var uglify = require'gulp-uglify';var imagemin = require'gulp-imagemin';var sourcemaps = require'gulp-sourcemaps';var del = require'del'; var paths = scripts: 'client/js/**/*.coffee' '!client/external/**/*.coffee' images: 'client/img/**/*'; // Not all tasks need to use streams // A gulpfile is just another node program and you can use any package available on npm gulptask'clean' // You can use multiple globbing patterns as you would with `gulp.src` return del'build';; gulptask'scripts' 'clean' // Minify and copy all JavaScript (except vendor scripts) // with sourcemaps all the way down return gulpsrcpathsscripts pipesourcemapsinit pipecoffee pipeuglify pipeconcat'all.min.js' pipesourcemapswrite pipegulpdest'build/js';; // Copy all static images gulptask'images' 'clean' return gulpsrcpathsimages // Pass in options to the task pipeimageminoptimizationLevel: 5 pipegulpdest'build/img';; // Rerun the task when a file changes gulptask'watch' gulpwatchpathsscripts 'scripts'; gulpwatchpathsimages 'images';; // The default task (called when you run `gulp` from cli) gulptask'default' 'watch' 'scripts' 'images';
We recommend these plugins:
Anyone can help make this project better - check out our Contributing guide!