Socket
Socket
Sign inDemoInstall

minify-stream

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minify-stream

minify javascript in a stream using uglify-js


Version published
Weekly downloads
35K
decreased by-25.57%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 21 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc