Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

gulp-fs-cache

0.1.0 • Public • Published

gulp-fs-cache NPM version Build Status

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/'));
});

install

npm i gulp-fs-cache

Downloadsweekly downloads

238

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability