aster-uglify

2019-09-12

aster-uglify是什么

什么是aster-uglify,Minify scripts with UglifyJS2 in aster.

aster-uglify使用教程帮助文档

aster-uglify

NPM versionBuild Status

Minify scripts with UglifyJS2 in aster.

Usage

First, install aster-uglifyas a development dependency:

npm install --save-dev aster-uglify

Then, add it to your build script:

var aster = require('aster');
var uglify = require('aster-uglify');

aster.src('src/**/*.js')
.map(uglify({
  mangle: true,
  compress: {
    unsafe: true
  }
}))
.map(aster.dest('dist'))
.subscribe(aster.runner);

API

uglify(options)

options.mangle

Type: BooleanDefault: false

Mangle names.

options.compress

Type: ObjectDefault: false

See available list of options here.

License

MIT License


上一篇:grunt-artoo
下一篇:polyfills
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部