Nifty Procrastination Machine

    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

    2,199

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • bancek