Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

goto-bus-stop/minify-stream

Repository files navigation

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

About

minify javascript in a stream using uglify-js (ES5) or terser (ES6+)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

AltStyle によって変換されたページ (->オリジナル) /