UglifyJS 3
==========
UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.
#### Note:
- `uglify-js` supports JavaScript and most language features in ECMAScript.
- For more exotic parts of ECMAScript, process your source file with transpilers
like [Babel](https://babeljs.io/) before passing onto `uglify-js`.
- `uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage)
that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS/tree/v2.x).
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-js -g
From NPM for programmatic use:
npm install uglify-js
# 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`.
`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 parentheses. Note: you may
want to disable `negate_iife` under
compressor options.
-O, --output-opts [options] Specify output options (`beautify` disabled by default).
-o, --output <file> Output file path (default STDOUT). Specify `ast` or
`spidermonkey` to write UglifyJS or SpiderMonkey AST
as JSON to STDOUT respectively.
--annotations Process and preserve comment annotations.
(`/*@__PURE__*/` or `/*#__PURE__*/`)
--no-annotations Ignore and discard comment annotations.
--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.
-e, --enclose [arg[:value]] Embed everything in a big function, with configurable
argument(s) & value(s).
--expression Parse a single expression, rather than a program
(for parsing JSON).
--ie Support non-standard Internet Explorer.
Equivalent to setting `ie: true` in `minify()`
for `compress`, `mangle` and `output` options.
By default UglifyJS will not try to be IE-proof.
--keep-fargs Do not mangle/drop function arguments.
--keep-fnames Do not mangle/drop function names. Useful for
code relying on Function.prototype.name.
--module Process input as ES module (implies --toplevel)
--name-cache <file> File to hold mangled name mappings.
--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` Filename and/or location of the output source
(sets `file` attribute in source map).
`includeSources` Pass this flag if you want to include
没有合适的资源?快使用搜索试试~ 我知道了~
redocly的离线安装包,可以从openapi生成html网页
共2000个文件
js:1496个
md:358个
json:87个
需积分: 0 0 下载量 8 浏览量
2023-09-23
15:34:52
上传
评论
收藏 19.68MB ZIP 举报
温馨提示
redocly的离线安装包,可以从openapi生成html网页
资源推荐
资源详情
资源评论
收起资源包目录
redocly的离线安装包,可以从openapi生成html网页 (2000个子文件)
bass.css 11KB
prism-treeview.css 8KB
prism-treeview.min.css 7KB
prism-previewers.css 5KB
style.css 4KB
prism-previewers.min.css 4KB
prism-coy.css 4KB
prism-twilight.css 4KB
prism-coy.min.css 3KB
prism-solarizedlight.css 3KB
prism-funky.css 2KB
prism-twilight.min.css 2KB
prism.css 2KB
prism-dark.css 2KB
prism-funky.min.css 2KB
prism-okaidia.css 2KB
prism.min.css 2KB
prism-tomorrow.css 2KB
prism-solarizedlight.min.css 2KB
prism-toolbar.css 2KB
prism-line-highlight.css 2KB
prism-dark.min.css 1KB
prism-okaidia.min.css 1KB
prism-tomorrow.min.css 1KB
prism-toolbar.min.css 1KB
prism-line-highlight.min.css 1KB
prism-inline-color.css 1KB
github.css 1KB
prism-command-line.css 949B
source-code-pro.css 938B
react-tabs.css 842B
prism-match-braces.css 815B
prism-line-numbers.css 782B
prism-match-braces.min.css 758B
prism-command-line.min.css 751B
prism-line-numbers.min.css 609B
prism-inline-color.min.css 527B
prism-show-invisibles.css 456B
prism-show-invisibles.min.css 386B
prism-diff-highlight.css 379B
prism-unescaped-markup.css 359B
prism-diff-highlight.min.css 336B
prism-unescaped-markup.min.css 250B
prism-wpd.css 235B
bass-addons.css 221B
prism-wpd.min.css 205B
prism-autolinker.css 29B
prism-autolinker.min.css 23B
index.html 319KB
index.html 4KB
main.js 783KB
mobx.umd.development.js 209KB
mobx.esm.js 192KB
mobx.cjs.development.js 188KB
mobx.esm.development.js 186KB
polished.js 132KB
polished.js 132KB
argparse.js 127KB
polished.cjs.js 124KB
polished.esm.js 122KB
js-yaml.js 112KB
styled-components.js 95KB
compile.js 68KB
index.js 63KB
prism.js 57KB
parser.js 56KB
mobx.cjs.production.min.js 50KB
mobx.umd.production.min.js 50KB
mobx.esm.production.min.js 50KB
loader.js 50KB
loader.js 46KB
yargs-parser.js 45KB
index.js 45KB
index.es.js 44KB
index.js 42KB
js-yaml.min.js 39KB
prism-core.js 38KB
emit.js 37KB
emit.js 36KB
_stream_readable.js 35KB
polished.min.js 34KB
regenerate.js 34KB
index.js 33KB
prism-sqf.js 33KB
prism-sqf.min.js 33KB
mobxreact.umd.development.js 32KB
dumper.js 31KB
styled-components.browser.cjs.js 30KB
styled-components.min.js 29KB
react-tabs.development.js 29KB
mobxreact.cjs.development.js 29KB
styled-components.browser.esm.js 29KB
styled-components.cjs.js 29KB
styled-components.esm.js 28KB
index.js 28KB
mobxreact.esm.js 27KB
mobxreact.esm.development.js 27KB
parse.js 27KB
components.js 26KB
_stream_writable.js 21KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
weixin_44102360
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功