gulp-pcache

2.0.1 • Public • Published

gulp-pcache

gulp incremental build on each process.

usage.

const gulp = require('gulp');
const eslint = require('gulp-eslint');
const concat = require('gulp-concat');
const pcache = require('gulp-pcache')({path: __dirname + '/.gulpcache'});
 
// only passthrough modified files.
gulp.task('scripts:eslint', function() {
  return gulp.src('**/*.js')
    .pipe(pcache('scripts:eslint'))
    .pipe(eslint());
});
 
// only passthrough modified files.
// and remember stream.
gulp.task('scripts:concat', function() {
  return gulp.src('**/*.js')
    .pipe(pcache('scripts:concat'))
    .pipe(remember('scripts:concat'))
    .pipe(concat())
    .pipe(gulp.dest('bundle.js'));
});
 
gulp.task('cache:clear', function() {
  pcache.clear();
});
 
// auto save cache.
process.on('exit', function() {
  pcache.save();
});
 

Readme

Keywords

Package Sidebar

Install

npm i gulp-pcache

Weekly Downloads

2

Version

2.0.1

License

MIT

Last publish

Collaborators

  • hrsh7th