uglify-es
=========
A JavaScript parser, mangler/compressor and beautifier toolkit for ES6+.
#### Note:
- **`uglify-es` is API/CLI compatible with `uglify-js@3`.**
- **`uglify-es` is not backwards compatible with `uglify-js@2`.**
Install
-------
First make sure you have installed the latest version of [node.js](http://nodejs.org/)
(You may need to restart your computer after this step).
From NPM for use as a command line app:
npm install uglify-es -g
From NPM for programmatic use:
npm install uglify-es
# Command line usage
uglifyjs [input files] [options]
UglifyJS can take multiple input files. It's recommended that you pass the
input files first, then pass the options. UglifyJS will parse input files
in sequence and apply any compression options. The files are parsed in the
same global scope, that is, a reference from a file to some
variable/function declared in another file will be matched properly.
If no input file is specified, UglifyJS will read from STDIN.
If you wish to pass your options before the input files, separate the two with
a double dash to prevent input files being used as option arguments:
uglifyjs --compress --mangle -- input.js
### Command line options
```
-h, --help Print usage information.
`--help options` for details on available options.
-V, --version Print version number.
-p, --parse <options> Specify parser options:
`acorn` Use Acorn for parsing.
`bare_returns` Allow return outside of functions.
Useful when minifying CommonJS
modules and Userscripts that may
be anonymous function wrapped (IIFE)
by the .user.js engine `caller`.
`expression` Parse a single expression, rather than
a program (for parsing JSON).
`spidermonkey` Assume input files are SpiderMonkey
AST format (as JSON).
-c, --compress [options] Enable compressor/specify compressor options:
`pure_funcs` List of functions that can be safely
removed when their return values are
not used.
-m, --mangle [options] Mangle names/specify mangler options:
`reserved` List of names that should not be mangled.
--mangle-props [options] Mangle properties/specify mangler options:
`builtins` Mangle property names that overlaps
with standard JavaScript globals.
`debug` Add debug prefix and suffix.
`domprops` Mangle property names that overlaps
with DOM properties.
`keep_quoted` Only mangle unquoted properties.
`regex` Only mangle matched property names.
`reserved` List of names that should not be mangled.
-b, --beautify [options] Beautify output/specify output options:
`beautify` Enabled with `--beautify` by default.
`preamble` Preamble to prepend to the output. You
can use this to insert a comment, for
example for licensing information.
This will not be parsed, but the source
map will adjust for its presence.
`quote_style` Quote style:
0 - auto
1 - single
2 - double
3 - original
`wrap_iife` Wrap IIFEs in parenthesis. Note: you may
want to disable `negate_iife` under
compressor options.
-o, --output <file> Output file path (default STDOUT). Specify `ast` or
`spidermonkey` to write UglifyJS or SpiderMonkey AST
as JSON to STDOUT respectively.
--comments [filter] Preserve copyright comments in the output. By
default this works like Google Closure, keeping
JSDoc-style comments that contain "@license" or
"@preserve". You can optionally pass one of the
following arguments to this flag:
- "all" to keep all comments
- a valid JS RegExp like `/foo/` or `/^!/` to
keep only matching comments.
Note that currently not *all* comments can be
kept when compression is on, because of dead
code removal or cascading statements into
sequences.
--config-file <file> Read `minify()` options from JSON file.
-d, --define <expr>[=value] Global definitions.
--ecma <version> Specify ECMAScript release: 5, 6, 7 or 8.
--ie8 Support non-standard Internet Explorer 8.
Equivalent to setting `ie8: true` in `minify()`
for `compress`, `mangle` and `output` options.
By default UglifyJS will not try to be IE-proof.
--keep-classnames Do not mangle/drop class names.
--keep-fnames Do not mangle/drop function names. Useful for
code relying on Function.prototype.name.
--name-cache <file> File to hold mangled name mappings.
--safari10 Support non-standard Safari 10/11.
Equivalent to setting `safari10: true` in `minify()`
for `mangle` and `output` options.
By default `uglify-es` will not work around
Safari 10/11 bugs.
--self Build UglifyJS as a library (implies --wrap UglifyJS)
--source-map [options] Enable source map/specify source map options:
`base` Path to compute relative paths from input files.
`content` Input source map, useful if you're compressing
JS that was generated from some other original
code. Specify "inline" if the source map is
included within the sources.
`filename` Name and/or location of the output source.
`includeSources` Pass this flag if you want to include
the content of source files in the
source map as sourcesContent property.
`root` Path to the original source to be included in
the source map.
`url` If specified, path to the source map to append in
`//# sourceMappingURL`.
--timings Disp
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
微信小程序+反编译工具 (435个子文件)
acorn 298B
acorn 60B
LICENSE.BSD 1KB
ChangeLog 10KB
data.cjs 76KB
index.cjs 23KB
match.cjs 19KB
generic.cjs 17KB
Lexer.cjs 15KB
parse.cjs 14KB
List.cjs 13KB
match-graph.cjs 12KB
create.cjs 11KB
utils.cjs 8KB
TokenStream.cjs 8KB
AnPlusB.cjs 8KB
create.cjs 7KB
generic-an-plus-b.cjs 7KB
char-code-definitions.cjs 7KB
structure.cjs 5KB
token-before.cjs 5KB
Declaration.cjs 4KB
UnicodeRange.cjs 4KB
generic-urange.cjs 4KB
AttributeSelector.cjs 4KB
mix.cjs 4KB
Condition.cjs 4KB
index-generate.cjs 3KB
ident.cjs 3KB
error.cjs 3KB
index-parse.cjs 3KB
url.cjs 3KB
generate.cjs 3KB
string.cjs 3KB
index.cjs 3KB
names.cjs 3KB
data.cjs 3KB
create.cjs 3KB
feature-range.cjs 3KB
sourceMap.cjs 3KB
FeatureRange.cjs 3KB
selector.cjs 2KB
Atrule.cjs 2KB
OffsetToLocation.cjs 2KB
Block.cjs 2KB
SyntaxError.cjs 2KB
default.cjs 2KB
types.cjs 2KB
StyleSheet.cjs 2KB
MediaCondition.cjs 2KB
Ratio.cjs 2KB
feature.cjs 2KB
trace.cjs 2KB
Feature.cjs 2KB
index.cjs 2KB
units.cjs 2KB
MediaFeature.cjs 2KB
supports.cjs 2KB
search.cjs 2KB
PseudoElementSelector.cjs 2KB
create.cjs 2KB
PseudoClassSelector.cjs 2KB
DeclarationList.cjs 1KB
index-parse-selector.cjs 1KB
Combinator.cjs 1KB
tokenizer.cjs 1KB
Url.cjs 1KB
walk.cjs 1KB
Rule.cjs 1KB
TypeSelector.cjs 1KB
var.cjs 1KB
MediaQuery.cjs 1KB
Raw.cjs 1KB
prepare-tokens.cjs 1KB
AtrulePrelude.cjs 1KB
GeneralEnclosed.cjs 1KB
Function.cjs 1KB
Nth.cjs 1KB
sequence.cjs 1KB
index.cjs 974B
parser.cjs 923B
import.cjs 897B
Comment.cjs 854B
IdSelector.cjs 847B
create.cjs 824B
SelectorList.cjs 810B
Selector.cjs 781B
Parentheses.cjs 775B
Brackets.cjs 752B
MediaQueryList.cjs 734B
value.cjs 729B
WhiteSpace.cjs 644B
Dimension.cjs 642B
ClassSelector.cjs 619B
Hash.cjs 587B
String.cjs 559B
names.cjs 545B
NestingSelector.cjs 540B
create-custom-error.cjs 532B
index.cjs 526B
共 435 条
- 1
- 2
- 3
- 4
- 5
资源评论
lewis@110
- 粉丝: 180
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于c++的个人收支管理系统设计
- docker一键安装包
- Screenshot_20240430_144340_com.ss.android.ugc.live.jpg
- 回到山沟沟.mp3
- 基于matlab实现自适应波束形成RLS及LMS算法仿真源程序1.rar
- 基于matlab实现自己编写的基于卡尔曼滤波的利用加速度传感器的计步器,测试数据是传感器放在腰部和手臂 .rar
- 基于matlab实现阵列信号处理,波束形成.rar
- 111111111111111111
- 基于matlab实现计步器编程;对当前的计步器装置的数值算法模拟 .rar
- Mdb学习查看PW;access;mdb;pw;password;patch
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功