1.0.8 • Published 7 years ago

stc-uglify v1.0.8

Weekly downloads
41
License
-
Repository
github
Last release
7 years ago

stc-uglify

Use UglifyJS to compress JavaScript

Install

npm install stc-uglify

How to use

//stc.config.js

import uglify from 'stc-uglify';

stc.workflow({
  jsCompress: {plugin: uglify, include: /\.js$/, options: {}}
});

支持的配置

// 详细文档参考: https://github.com/mishoo/UglifyJS
// 部分配置需要参考代码
{
	strict_semicolons: false,

	mangle_options: {
		// angularjs --> mangle: false
		mangle       : true,
        toplevel     : false,
        defines      : null,
        except       : null,
        no_functions : false
	}, 
	squeeze_options: {
		make_seqs   : true,
        dead_code   : true,
        no_warnings : false,
        keep_comps  : true,
        unsafe      : false
	}, 
	gen_options: {
		indent_start : 0,
        indent_level : 4,
        quote_keys   : false,
        space_colon  : false,
        beautify     : false,
        ascii_only   : false,
        inline_script: false
	}
}
1.0.8

7 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago