gulp-fs-cache
v0.1.0
Published
Gulp plugin for caching processed files to filesystem
Downloads
4,823
Maintainers
Readme
gulp-fs-cache
gulp-fs-cache
is a gulp plugin that saves processed files to filesystem. It removes already processed files from stream and adds it back after processing.
gulp-fs-cache
works similar to gulp-remember
but saves files to filesystem so they can be reused between multiple gulp
runs (e.g. to speed up CI).
Usage
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sourcemaps = require('gulp-sourcemaps'),
fsCache = require('gulp-fs-cache');
gulp.task('scripts', function () {
var jsFsCache = fsCache('.tmp/jscache'); // save cache to .tmp/jscache
return gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(jsFsCache)
.pipe(uglify())
.pipe(jsFsCache.restore)
.pipe(sourcemaps.write('maps'))
.pipe(gulp.dest('public/'));
});