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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?