Skip to content

fcurella/gulp-webpack-bundle-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gulp-webpack-bundle-tracker

A Gulp plugin for generating a JSON file similar to webpack-bundle-tracker.

Inspired by gulp-json-hash-manifest.

Installation

npm install gulp-webpack-bundle-tracker --save-dev

Usage

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())
});

Options

  • 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

About

A Gulp plugin for generating a JSON file similar to webpack-bundle-tracker.

Resources

License

Stars

Watchers

Forks

Packages

No packages published