gulp 3 lts
The streaming build system
![License](https://img.shields.io/github/license/electric-eloquence/gulp.svg)
This package provides long-term support for gulp at major version 3.
This includes maintenance fixes and security updates.
The scoping of this package makes it an entirely different package from unscoped
gulp and precludes any access from any gulp plugins if it is installed with the
usual npm install @electric-eloquence/gulp
command.
Instead, follow these instructions:
Install
- Latest version (without Git):
npm install https://github.com/electric-eloquence/gulp/tarball/v3-lts@3.9.10
- Or add
"gulp": "https://github.com/electric-eloquence/gulp/tarball/v3-lts@3.9.10"
as a dependency in package.json.
- Latest version (with Git):
npm install electric-eloquence/gulp
- Specific version (with Git):
npm install electric-eloquence/gulp#3.9.10
- Semver range (with Git):
npm install electric-eloquence/gulp#semver:^3.9.10
- When installed one of these ways, other packages depending on gulp will get
gulp 3 with long-term support.
What is gulp?
- Automation - gulp is a toolkit that helps you automate painful or
time-consuming tasks in your development workflow.
- Platform-agnostic - Integrations are built into all major IDEs and people
are using gulp with PHP, .NET, Node.js, Java, and other platforms.
- Strong Ecosystem - Use npm modules to do anything you want + over 2000
curated plugins for streaming file transformations.
- Simple - By providing only a minimal API surface, gulp is easy to learn
and simple to use.
Documentation
For a Getting Started guide, API docs, recipes, making a plugin, etc. check out our docs!
Sample 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/**/*'
};
gulp.task('clean', function() {
return del(['build']);
});
gulp.task('scripts', ['clean'], function() {
return gulp.src(paths.scripts)
.pipe(sourcemaps.init())
.pipe(coffee())
.pipe(uglify())
.pipe(concat('all.min.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('build/js'));
});
gulp.task('images', ['clean'], function() {
return gulp.src(paths.images)
.pipe(imagemin({ optimizationLevel: 5 }))
.pipe(gulp.dest('build/img'));
});
gulp.task('watch', function() {
gulp.watch(paths.scripts, ['scripts']);
gulp.watch(paths.images, ['images']);
});
gulp.task('default', ['watch', 'scripts', 'images']);
Incremental Builds
We recommend these plugins:
- gulp-changed - only pass through changed files
- gulp-cached - in-memory file cache, not for operation on sets of files
- gulp-remember - pairs nicely with gulp-cached
- gulp-newer - pass through newer source files only, supports many:1 source:dest
Troubleshooting Installation
npm ERR! code EINTEGRITY
- If npm warns that the tarball seems to be corrupted, delete your
package-lock.json, and install again.
Acknowledgments
This package is forked from
the upstream source with the same name.
This fork is mostly derivative and adds little functionality. Credit and
gratitude are due for
the contributors to the source.
It is our intent to work in their favor by maintaining an older version of their
project, which may otherwise be burdensome for them to commit time to.