UglifyJS 3
==========
UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.
#### Note:
- **`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/UglifyJS2/tree/v2.x)**.
- **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS2/tree/v2.x)**.
- `uglify-js` only supports JavaScript (ECMAScript 5).
- To minify ECMAScript 2015 or above, transpile using tools like [Babel](https://babeljs.io/).
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`.
`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.
-e, --enclose [arg[:value]] Embed everything in a big function, with configurable
argument(s) & value(s).
--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-fnames Do not mangle/drop function names. Useful for
code relying on Function.prototype.name.
--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
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
没有合适的资源?快使用搜索试试~ 我知道了~
基于HTML+CSS+JavaScript的网页项目大作业(含前后端,jQuery,开发文档,讲解PPT,动画,轮播图)
共1463个文件
js:701个
md:170个
json:122个
需积分: 0 0 下载量 179 浏览量
2023-07-05
19:49:10
上传
评论
收藏 6.71MB 7Z 举报
温馨提示
基于HTML+CSS+JavaScript的网页项目大作业(含前后端,jQuery,开发文档,讲解PPT,动画,轮播图)+期末网页大作业含前后端,jQuery,开发文档,讲解PPT,动画,轮播图 适用于毕业设计,期末网页大作业,或者初学前后端的初学者,文本内容是以一个关于网站众筹的网页,开发背景是关于众筹的背景,众筹是一种新兴的融资模式,它主要采用“预消费”模式,通过互联网及社交网络服务向公众展示最新的创意,争取大家的关注和支持,以此来向公共筹集资金,利用公众的力量为中小企业、创业者或者个人提供创意项目的资金援助。.
资源推荐
资源详情
资源评论
收起资源包目录
基于HTML+CSS+JavaScript的网页项目大作业(含前后端,jQuery,开发文档,讲解PPT,动画,轮播图) (1463个子文件)
he.1 3KB
acorn 298B
acorn 59B
AUTHORS 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
LICENSE.BSD 1KB
ChangeLog 10KB
esgenerate.cmd 332B
escodegen.cmd 331B
esvalidate.cmd 330B
esparse.cmd 327B
uglifyjs.cmd 327B
html-minifier.cmd 325B
acorn.cmd 320B
mime.cmd 316B
he.cmd 314B
sample-cli-config-file.conf 1KB
bootstrap.css 143KB
bootstrap.min.css 119KB
animate.css 93KB
animate.min.css 70KB
animate.compat.css 69KB
bootstrap-theme.css 25KB
bootstrap-theme.min.css 23KB
swiper.css 21KB
swiper.min.css 19KB
index.css 7KB
animate.css 4KB
login.css 3KB
public.css 2KB
service.css 2KB
_base.css 1KB
flip.css 891B
bounce.css 714B
wobble.css 625B
jello.css 616B
bounceIn.css 600B
platform.css 567B
flipInY.css 559B
flipInX.css 559B
bounceInRight.css 534B
bounceInDown.css 531B
bounceInLeft.css 529B
bounceInUp.css 527B
hinge.css 495B
headShake.css 443B
zoomOutDown.css 441B
zoomOutUp.css 435B
rubberBand.css 424B
tada.css 418B
zoomInRight.css 408B
zoomInDown.css 405B
zoomInLeft.css 405B
operate.css 401B
zoomInUp.css 399B
flipOutX.css 396B
flipOutY.css 396B
lightSpeedInRight.css 365B
heartBeat.css 363B
lightSpeedInLeft.css 362B
swing.css 357B
pulse.css 326B
jackInTheBox.css 325B
bounceOut.css 323B
bounceOutDown.css 317B
bounceOutUp.css 312B
rollIn.css 303B
zoomOutRight.css 292B
zoomOutLeft.css 288B
backOutRight.css 283B
backOutLeft.css 281B
backInRight.css 280B
backOutDown.css 279B
backInLeft.css 278B
backInDown.css 278B
backOutUp.css 274B
shakeX.css 273B
shakeY.css 273B
backInUp.css 271B
shake.css 270B
rollOut.css 267B
rotateInDownRight.css 263B
rotateInDownLeft.css 260B
rotateInUpRight.css 258B
rotateInUpLeft.css 253B
bounceOutRight.css 246B
lightSpeedOutRight.css 245B
lightSpeedOutLeft.css 244B
bounceOutLeft.css 243B
fadeOutBottomRight.css 233B
rotateIn.css 232B
fadeOutBottomLeft.css 231B
fadeInBottomRight.css 230B
rotateOutDownRight.css 230B
fadeInBottomLeft.css 228B
rotateOutDownLeft.css 225B
fadeOutTopRight.css 225B
rotateOutUpRight.css 223B
共 1463 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
资源评论
新秀小星星
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功