minify-stream

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

Github星跟踪图

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

主要指标

概览
名称与所有者goto-bus-stop/minify-stream
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2017-09-27 09:43:13
推送于2021-04-29 21:12:06
最后一次提交
发布数7
最新版本名称v2.1.0 (发布于 )
第一版名称v1.0.0 (发布于 2017-09-27 11:46:15)
用户参与
星数27
关注者数2
派生数13
提交数29
已启用问题?
问题数3
打开的问题数1
拉请求数6
打开的拉请求数2
关闭的拉请求数10
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?