@yuku-t/gulp-rev-rails-manifest
v0.1.1
Published
Write manifest.json that is Rails assets helper compatible
Downloads
4
Maintainers
Readme
gulp-rev-rails-manifest
Write gulp-rev manifest.json that is Rails assets helper compatible
Install
$ npm install --save-dev @yuku-t/gulp-rev-rails-manifest
Usage
var gulp = require('gulp');
var rev = require('gulp-rev');
var manifest = require('gulp-rev-rails-manifest');
gulp.task('default', function () {
return gulp.src(['assets/css/*.css', 'assets/js/*.js'], {base: 'assets'})
.pipe(rev())
.pipe(gulp.dest('build/assets')) // write rev'd assets to build dir
.pipe(manifest())
.pipe(gulp.dest('build/assets')); // write manifest to build dir
});
You can use *
in path option to merge the manifest into existing Rails' one.
gulp.task('default', function () {
return gulp.src(['assets/css/*.css', 'assets/js/*.js'], {base: 'assets'})
.pipe(rev())
.pipe(gulp.dest('build/assets')) // write rev'd assets to build dir
.pipe(manifest({ path: 'manifest-*.json', merge: true }))
.pipe(gulp.dest('build/assets')); // write manifest to build dir
});