bundle-metadata

extract metadata about a browserify bundle

npm install bundle-metadata
6 downloads in the last day
74 downloads in the last week
183 downloads in the last month

bundle-metadata

Gather some metadata of a browserify bundle, & sort the files, so that a hash of the bundle will be consistent.

Examples

bundle bundle-metadata and save meta.json

npm install -g module-deps bundle-metadata browser-pack

cd ~/dev/bundle-metadata

module-deps index.js | bundle-metadata --meta meta.json | browser-pack > bundle.js
cat meta.json

from the api, use like this:

mdeps(entry)
.pipe(meta()
  .on('meta', function (meta) {
    console.error(meta)
  })
).pipe(browserPack())
.pipe(process.stdout)

as a browserify command

browserify -c 'bundle-metadata --meta meta.json' index.js > bundle.js

License

MIT

npm loves you