A Gulp plugin for generating a JSON file similar to webpack-bundle-tracker.
Inspired by gulp-json-hash-manifest.
npm install gulp-webpack-bundle-tracker --save-dev
var named = require('vinyl-named');
var path = require('path');
var bundles = require('gulp-webpack-bundle-tracker');
gulp.task('compile', function(callback) {
return gulp.src('js/*.js')
// other plugins here...
.pipe(named(function(file) {
// use the first portion of the filename as the bundle name
return path.basename(file.path).split('.')[0]
}))
.pipe(bundles())
});
-
dest
- string
The destination directory of the hash manifest file.
Default:process.cwd()
(the current working directory) -
filename
- string
The filename of the stats manifest file.
Default:webpack-stats.json