How to use the gulp-rev.manifest function in gulp-rev

To help you get started, we’ve selected a few gulp-rev examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github universitas / universitas.no / gulpfile.js / tasks / rev / rev-assets.js View on Github external
gulp.task('rev-assets', function() {
  // Ignore files that may reference assets. We'll rev them next.
  var ignoreThese = '!' + path.join(config.root.dest,'/**/*+(css|js|xml|json|html)');

  return gulp.src([path.join(config.root.dest,'/**/*'), ignoreThese])
    .pipe(rev())
    .pipe(gulp.dest(config.root.dest))
    .pipe(revNapkin({verbose: false}))
    .pipe(rev.manifest(path.join(config.root.dest, 'rev-manifest.json'), {merge: true}))
    .pipe(gulp.dest(''));
});
github mmikkel / Reasons-Craft / gulpfile.js / tasks / rev / rev-assets.js View on Github external
gulp.task('rev-assets', function() {
  // Ignore files that may reference assets. We'll rev them next.
  var ignoreThese = '!' + path.join(config.root.dest,'/**/*+(css|js|json|html|svg)')

  return gulp.src([path.join(config.root.dest,'/**/*'), ignoreThese])
    .pipe(rev())
    .pipe(gulp.dest(config.root.dest))
    .pipe(revNapkin({verbose: false}))
    .pipe(rev.manifest(path.join(config.root.dest, 'rev-manifest.json'), {merge: true}))
    .pipe(gulp.dest(''))
})
github lukeed / fannypack / tasks / rev / rev-assets.js View on Github external
gulp.task('rev-assets', function() {
    // Ignore files that may reference assets. We'll rev them next.
    var ignoreThese = '!' + path.join(config.root.dest,'/**/*+(json|html|php)')

    return gulp.src([path.join(config.root.dest,'/**/*'), ignoreThese])
      .pipe(rev())
      .pipe(gulp.dest(config.root.dest))
      .pipe(revNapkin({verbose: false}))
      .pipe(rev.manifest(path.join(config.root.dest, 'rev-manifest.json'), {merge: true}))
      .pipe(gulp.dest(''))
  })
};
github ladjs / lad / template / gulpfile.js View on Github external
async function compile() {
  return src('build/js/**/*.js', {
    since: lastRun(compile)
  })
    .pipe(sourcemaps.init({ loadMaps: true }))
    .pipe(envify(env))
    .pipe(unassert())
    .pipe(babel())
    .pipe(gulpif(PROD, terser()))
    .pipe(gulpif(PROD, rev()))
    .pipe(sourcemaps.write('./'))
    .pipe(dest(config.buildBase))
    .pipe(gulpif(DEV, lr(config.livereload)))
    .pipe(gulpif(PROD, rev.manifest(config.manifest, manifestOptions)))
    .pipe(gulpif(PROD, dest(config.buildBase)));
}
github stomt / gulp-modular / tasks / bowerScripts.js View on Github external
gulp.task('bowerScripts', tasks, function() {
    var result = gulp.src(bowerFiles(bowerFilesOptions))
      .pipe(gulpif(config.build.bowerDebug, debug()))
      .pipe(sourceMaps.init())
      .pipe(gulpif(isFirstRun, newer(config.bowerScripts.dest + vendorFile)))
      .pipe(concat(vendorFile))
      .pipe(gulpif(config.build.uglify, uglify()))
      .pipe(gulpif(config.build.rev, rev()))
      .pipe(sourceMaps.write(config.build.sourceMapPath))
      .pipe(gulp.dest(config.bowerScripts.dest))
      .pipe(gulpif(config.build.rev, rev.manifest({cwd: config.statics.dest, merge: true})))
      .pipe(gulpif(config.build.rev, gulp.dest(config.statics.dest)));

    isFirstRun = false;
    return result;
  });
};
github stomt / gulp-modular / tasks / sass.js View on Github external
var optionsRev = {
        manifest: gulp.src('./' + config.fonts.dest + 'rev-manifest.json')
      };
    }

    return gulp.src(config.styles.src)
      .pipe(sourceMaps.init())
      .pipe(gulpif(config.preprocess && config.preprocess.apply.styles, preprocess(config.preprocess)))
      .pipe(sass(optionsSass).on('error', sass.logError))
      .pipe(autoPrefixer(config.styles.prefixer))
      .pipe(gulpif(config.build.rev && config.fonts, revReplace(optionsRev)))
      .pipe(gulpif(config.build.rev, rev()))
      .pipe(sourceMaps.write(config.build.sourceMapPath))
      .pipe(gulp.dest(config.styles.dest))
      .pipe(browserSync.stream({match: '**/*.css'}))
      .pipe(gulpif(config.build.rev, rev.manifest({cwd: config.statics.dest, merge: true})))
      .pipe(gulpif(config.build.rev, gulp.dest(config.statics.dest)));
  });
};
github pterodactyl / panel / gulpfile.js View on Github external
function styles() {
    return gulp.src(paths.styles.src)
        .pipe(sourcemaps.init())
        .pipe(postcss([
            require('postcss-import'),
            require('tailwindcss')('./tailwind.js'),
            require('precss'),
            require('postcss-preset-env')({stage: 0}),
            require('autoprefixer'),
        ]))
        .pipe(gulpif(argv.production, cssmin()))
        .pipe(concat('bundle.css'))
        .pipe(rev())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(paths.styles.dest))
        .pipe(rev.manifest(paths.manifest + '/manifest.json', {merge: true, base: paths.manifest}))
        .pipe(gulp.dest(paths.manifest));
}
github universitas / universitas.no / gulpfile.js / tasks / rev / rev-css.js View on Github external
gulp.task('rev-css', function(){
  console.log(config.root.dest);
  return gulp.src(path.join(config.root.dest,'/**/*.css'))
    .pipe(rev())
    .pipe(minify())
    .pipe(gulp.dest(config.root.dest))
    .pipe(revNapkin({verbose: false}))
    .pipe(rev.manifest(path.join(config.root.dest, 'rev-manifest.json'), {merge: true}))
    .pipe(gulp.dest(''));
});
github Eyot424 / blocks / site-bak / gulpfile.js View on Github external
gulp.task('screenshot:rev', ['screenshot:clean'], function () {
  return gulp.src('public/themes/screenshots/*.png')
    .pipe(gulpRev())
    .pipe(gulp.dest(dirs.screenshots))
    .pipe(gulpRev.manifest())
    .pipe(gulp.dest(dirs.screenshots))
})
github LWJGL / lwjgl3-www / gulpfile.js View on Github external
gulp.task('styles-manifest', () =>
  gulp.src(['layout'].map(item => 'public/css/' + item + '.css'))
    .pipe(rev())
    .pipe(gulp.dest('public/css'))
    .pipe(rev.manifest('manifest-css.json', {merge: true}))
    .pipe(gulp.dest('.'))
);

gulp-rev

Static asset revisioning by appending content hash to filenames: unicorn.css => unicorn-d41d8cd98f.css

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis

Popular gulp-rev functions