minify-stream
minify javascript in a stream using uglify-js
Last updated 5 months ago by goto-bus-stop .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install minify-stream 
SYNC missed versions from official npm registry.

minify-stream

minify javascript in a stream using uglify-js

npm travis standard

Install

npm install minify-stream

Usage

var minifyStream = require('minify-stream')

fs.createReadStream('app.js')
  .pipe(minifyStream())
  .pipe(fs.createWriteStream('app.min.js'))

API

minifyStream(?options)

Create a new minify stream. Write a Javascript file or bundle to it. Possible options are:

  • uglify - An uglify module to use, defaults to terser. It must have an uglify-compatible minify() function.
  • All other options are passed to the minify() function as the second parameter. See the terser docs for available options.

minify-stream adds inline source maps by default. Use exorcist to extract source maps from the output stream into a separate file. If you don't need source maps, pass the sourceMap: false option to disable them.

minifyStream({ sourceMap: false })

License

MIT

Current Tags

  • 2.0.1                                ...           latest (5 months ago)

6 Versions

  • 2.0.1                                ...           5 months ago
  • 2.0.0                                ...           7 months ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 1
This Week 1
This Month 91
Last Day 2
Last Week 31
Last Month 115
Dependencies (6)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |