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
没有合适的资源?快使用搜索试试~ 我知道了~
待办事项web源码,适合新手_todolist
共2000个文件
js:9470个
ts:1149个
md:1071个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 50 浏览量
2022-09-22
15:58:07
上传
评论
收藏 79.22MB 7Z 举报
温馨提示
待办事项web源码,react构建,适合新手!
资源推荐
资源详情
资源评论
收起资源包目录
待办事项web源码,适合新手_todolist (2000个子文件)
Yoga.cpp 155KB
ConnectionTests.cpp 77KB
Differentiator.cpp 73KB
LayoutAnimationKeyFrameManager.cpp 65KB
Binding.cpp 59KB
testlib.cpp 46KB
JSCRuntime.cpp 44KB
MessageTypes.cpp 37KB
Connection.cpp 36KB
YGJNIVanilla.cpp 34KB
MountingTest.cpp 34KB
JavaTurboModule.cpp 28KB
Inspector.cpp 24KB
UIManagerBinding.cpp 23KB
YogaLayoutableShadowNode.cpp 23KB
JSIExecutor.cpp 18KB
YGNode.cpp 17KB
InspectorState.cpp 16KB
LayoutableShadowNodeTest.cpp 15KB
jsi.cpp 14KB
Transform.cpp 13KB
Scheduler.cpp 13KB
MessageTests.cpp 13KB
ShadowTree.cpp 13KB
NativeToJsBridge.cpp 12KB
AndroidTextInputProps.cpp 12KB
UIManager.cpp 11KB
Props.cpp 11KB
CatalystInstanceImpl.cpp 11KB
InspectorTests.cpp 11KB
ScrollViewProps.cpp 10KB
RawPropsTest.cpp 10KB
BridgeNativeModulePerfLogger.cpp 9KB
TurboModulePerfLogger.cpp 9KB
LayoutableShadowNode.cpp 9KB
ShadowNodeTest.cpp 9KB
MethodInvoker.cpp 9KB
Instance.cpp 9KB
LayoutTest.cpp 9KB
LayoutAnimationDriver.cpp 9KB
TextLayoutManager.cpp 9KB
ParagraphShadowNode.cpp 8KB
AndroidTextInputShadowNode.cpp 8KB
HermesExecutorFactory.cpp 8KB
TextAttributes.cpp 8KB
JavaModuleWrapper.cpp 8KB
ShadowNode.cpp 8KB
ModuleRegistry.cpp 7KB
ViewTest.cpp 7KB
MessageConverters.cpp 7KB
FindNodeAtPointTest.cpp 7KB
MicroProfiler.cpp 7KB
YGNodePrint.cpp 7KB
ViewProps.cpp 7KB
CxxNativeModule.cpp 7KB
main.cpp 7KB
OnLoad.cpp 7KB
ShadowTreeLifeCycleTest.cpp 7KB
AndroidTextInputEventEmitter.cpp 7KB
ComponentDescriptorRegistry.cpp 7KB
SampleTurboModuleSpec.cpp 6KB
StubViewTree.cpp 6KB
TurboCxxModule.cpp 6KB
StateReconciliationTest.cpp 6KB
JSIDynamic.cpp 6KB
UITemplateProcessorTest.cpp 6KB
RawPropsParser.cpp 6KB
UITemplateProcessor.cpp 6KB
MountingCoordinator.cpp 5KB
TurboModuleManager.cpp 5KB
methodcall.cpp 5KB
BaseTextProps.cpp 5KB
CoreComponentsRegistry.cpp 5KB
EventEmitters.cpp 5KB
YGEnums.cpp 5KB
JSBigString.cpp 5KB
NativeSampleTurboCxxModuleSpecJSI.cpp 5KB
SampleCxxModule.cpp 5KB
ProxyExecutor.cpp 4KB
TransactionTelemetry.cpp 4KB
ComponentDescriptorTest.cpp 4KB
jsarg_helpers.cpp 4KB
AndroidTextInputState.cpp 4KB
SampleTurboCxxModuleLegacyImpl.cpp 4KB
traitCastTest.cpp 4KB
TextInputShadowNode.cpp 4KB
JSIndexedRAMBundle.cpp 4KB
ConnectionDemuxTests.cpp 4KB
DebugStringConvertible.cpp 4KB
AsyncHermesRuntime.cpp 4KB
AutoAttachUtils.cpp 4KB
ConnectionDemux.cpp 4KB
ShadowNodeFamily.cpp 4KB
RemoteObjectsTableTest.cpp 4KB
ShadowViewMutation.cpp 4KB
OnLoad.cpp 4KB
YogaStylableProps.cpp 4KB
AttributedString.cpp 4KB
TextInputEventEmitter.cpp 4KB
ReadableNativeMap.cpp 3KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
alvarocfc
- 粉丝: 111
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功