2 <a href="http://gulpjs.com">
3 <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
5 <p align="center">The streaming build system</p>
8 [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
12 - **Automation** - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow.
13 - **Platform-agnostic** - Integrations are built into all major IDEs and people are using gulp with PHP, .NET, Node.js, Java, and other platforms.
14 - **Strong Ecosystem** - Use npm modules to do anything you want + over 2000 curated plugins for streaming file transformations
15 - **Simple** - By providing only a minimal API surface, gulp is easy to learn and simple to use
19 For a Getting started guide, API docs, recipes, making a plugin, etc. check out or docs!
21 - Need something reliable? Check out the [documentation for the current release](/docs/README.md)!
22 - Want to help us test the latest and greatest? Check out the [documentation for the next release](https://github.com/gulpjs/gulp/tree/4.0)!
24 ## Sample `gulpfile.js`
26 This file will give you a taste of what gulp does.
29 var gulp = require('gulp');
30 var coffee = require('gulp-coffee');
31 var concat = require('gulp-concat');
32 var uglify = require('gulp-uglify');
33 var imagemin = require('gulp-imagemin');
34 var sourcemaps = require('gulp-sourcemaps');
35 var del = require('del');
38 scripts: ['client/js/**/*.coffee', '!client/external/**/*.coffee'],
39 images: 'client/img/**/*'
42 // Not all tasks need to use streams
43 // A gulpfile is just another node program and you can use any package available on npm
44 gulp.task('clean', function() {
45 // You can use multiple globbing patterns as you would with `gulp.src`
46 return del(['build']);
49 gulp.task('scripts', ['clean'], function() {
50 // Minify and copy all JavaScript (except vendor scripts)
51 // with sourcemaps all the way down
52 return gulp.src(paths.scripts)
53 .pipe(sourcemaps.init())
56 .pipe(concat('all.min.js'))
57 .pipe(sourcemaps.write())
58 .pipe(gulp.dest('build/js'));
61 // Copy all static images
62 gulp.task('images', ['clean'], function() {
63 return gulp.src(paths.images)
64 // Pass in options to the task
65 .pipe(imagemin({optimizationLevel: 5}))
66 .pipe(gulp.dest('build/img'));
69 // Rerun the task when a file changes
70 gulp.task('watch', function() {
71 gulp.watch(paths.scripts, ['scripts']);
72 gulp.watch(paths.images, ['images']);
75 // The default task (called when you run `gulp` from cli)
76 gulp.task('default', ['watch', 'scripts', 'images']);
81 We recommend these plugins:
83 - [gulp-changed](https://github.com/sindresorhus/gulp-changed) - only pass through changed files
84 - [gulp-cached](https://github.com/contra/gulp-cached) - in-memory file cache, not for operation on sets of files
85 - [gulp-remember](https://github.com/ahaurw01/gulp-remember) - pairs nicely with gulp-cached
86 - [gulp-newer](https://github.com/tschaub/gulp-newer) - pass through newer source files only, supports many:1 source:dest
88 ## Want to contribute?
90 Anyone can help make this project better - check out our [Contributing guide](/CONTRIBUTING.md)!
92 [downloads-image]: https://img.shields.io/npm/dm/gulp.svg
93 [npm-url]: https://www.npmjs.com/package/gulp
94 [npm-image]: https://img.shields.io/npm/v/gulp.svg
96 [travis-url]: https://travis-ci.org/gulpjs/gulp
97 [travis-image]: https://img.shields.io/travis/gulpjs/gulp.svg
99 [coveralls-url]: https://coveralls.io/r/gulpjs/gulp
100 [coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp/master.svg
102 [gitter-url]: https://gitter.im/gulpjs/gulp
103 [gitter-image]: https://badges.gitter.im/gulpjs/gulp.png