A optimizer for fis to compress js by using uglify-js.
JavaScript
Latest commit 5a7cf86 Jul 13, 2016 @2betop 2betop publish 0.2.2
Failed to load latest commit information.
.gitignore npmignore update Apr 24, 2013
.npmignore npmignore update Apr 24, 2013
LICENSE.md init Apr 21, 2013
README.md Update README.md Sep 22, 2014
index.js fix: redundant comma && no-irregular-whitespace Jul 13, 2016
package.json publish 0.2.2 Jul 13, 2016

README.md

fis-optimizer-uglify-js

A optimizer for fis to compress js by using uglify-js.

使用

FIS内置

配置

在项目配置文件(默认fis-conf.js)配置

fis.config.set('settings.optimizer.uglify-js', option);

eg:

//export, module, require不压缩变量名
fis.config.set('settings.optimizer.uglify-js', {
    mangle: {
        except: 'exports, module, require, define'
    }
});

//自动去除console.log等调试信息
fis.config.set('settings.optimizer.uglify-js', {
    compress : {
        drop_console: true
    }
});

option 详细请参见 https://github.com/mishoo/UglifyJS2