intreq-stream

1.0.0 • Public • Published

intreq-stream

A more direct streaming interface for intreq, which removes any file paths from your bundles.

Generally it's nicer using it directly, but the browser-unpack module API would otherwise require you breaking your pipeline. This lets you pipe your JS in and get JS out the other side :)

Usage

NPM

intreqStream()

Creates a transform stream which accepts a browserify bundle as input, and outputs the same browserify bundle with its paths removed.

// Squish a browserify bundle as much
// as it can be squished:
var intreq     = require('intreq-stream')
var browserify = require('browserify')
var uglifyify  = require('uglifyify')
 
var src = __dirname + '/index.js'
 
browserify({
  fullPaths: false,
  debug: false,
  entries: [src]
}).transform(uglifyify, { sourcemap: false })
  .bundle()
  .pipe(intreq())
  .pipe(uglifyify(src, { sourcemap: false }))
  .pipe(fs.createWriteStream(__dirname + '/bundle.js'))

License

MIT. See LICENSE.md for details.

Package Sidebar

Install

npm i intreq-stream

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hughsk