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
没有合适的资源?快使用搜索试试~ 我知道了~
响应式网站设计(gulp打包与未打包两版)
共2000个文件
js:2319个
md:484个
json:464个
需积分: 15 3 下载量 39 浏览量
2018-08-24
15:38:34
上传
评论
收藏 12.13MB ZIP 举报
温馨提示
该项目主要介绍了响应式开发设计,设计知识点有:H5新增标签、媒体查询、尺寸单位选择px/em/rem、浏览器兼容性调试、http-server、广告轮播插件、项目打包上线等等,源代码分为gulp打包版与未打包版。两种版本采用不同的压缩包,代码之间无干扰,可独立运行。下载后,可以参考本人博客,博客中有关于该项目的详细笔记,如遇到任何问题,请联系本人(QQ:1454589506),欢迎下载参考学习,共同进步。
资源推荐
资源详情
资源评论
收起资源包目录
响应式网站设计(gulp打包与未打包两版) (2000个子文件)
combined-9e0757a4c8.css 16KB
combined-9821c374d1.css 16KB
main.css 14KB
main.css 14KB
normalize.css 7KB
normalize.css 7KB
owl.carousel.css 5KB
owl.carousel.css 5KB
owl.carousel.min.css 3KB
owl.carousel.min.css 3KB
owl.theme.default.css 1KB
owl.theme.default.css 1KB
owl.theme.green.css 1KB
owl.theme.green.css 1KB
printStyle.css 1KB
printStyle.css 1KB
cssresets.css 1KB
cssresets.css 1KB
owl.theme.default.min.css 1013B
owl.theme.green.min.css 1013B
owl.theme.default.min.css 1013B
owl.theme.green.min.css 1013B
qux.css 0B
baz.css 0B
index.html 12KB
index.html 12KB
index.html 11KB
LICENSE.html 7KB
props.html 2KB
login.html 134B
login.html 134B
404.html 0B
404.html 0B
lodash.js 527KB
compress.js 269KB
source-map.debug.js 266KB
source-map.debug.js 266KB
source-map.debug.js 254KB
csso-browser.js 205KB
csstree.js 169KB
lodash.compat.js 162KB
lodash.js 156KB
combined-b71e91c86b.js 140KB
lodash.underscore.js 132KB
core.js 112KB
source-map.js 104KB
source-map.js 104KB
source-map.js 100KB
owl.carousel.js 88KB
owl.carousel.js 88KB
jquery.min.js 85KB
jquery.min.js 85KB
lodash.min.js 71KB
parse.js 58KB
output.js 50KB
owl.carousel.min.js 43KB
owl.carousel.min.js 43KB
source-map-resolve.js 40KB
source-map-consumer.js 40KB
source-map-consumer.js 40KB
source-map-consumer.js 37KB
semver.js 32KB
semver.browser.js 31KB
ast.js 31KB
browser.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
_stream_readable.js 31KB
minimatch.js 28KB
index.js 27KB
_stream_readable.js 26KB
_stream_readable.js 26KB
source-map.min.js 26KB
source-map.min.js 26KB
index.js 26KB
source-map.min.js 26KB
_stream_readable.js 25KB
minimatch.js 25KB
minimatch.js 25KB
minimatch.js 25KB
minimatch.js 24KB
index.js 23KB
index.js 23KB
mozilla-ast.js 23KB
index.js 22KB
lodash.min.js 21KB
lodash.compat.min.js 20KB
Tokenizer.js 20KB
globule_test.js 20KB
_stream_writable.js 20KB
_stream_writable.js 20KB
_stream_writable.js 20KB
_stream_writable.js 20KB
_stream_writable.js 20KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
CHH5431
- 粉丝: 470
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 拼多多官方_main_main_baidu_sem_dz1_ARM64.apk
- 小米机型小米助手界面检测当前机型 包括 Android 版本、MIUI 版本和固件详细信息
- share6620081042528496742.jpg
- 21英语210405010143罗杰_周霜红 文献综述.doc
- share6329583338574047795.jpg
- ADS-matlab联合仿真包
- 基于yolov5实现火灾图像识别的代码
- 30天自制操作系统 (图灵程序设计丛书)
- 题目源码2024年强网杯全国网络安全挑战赛 PWN题目qroute源码
- 题目源码2024年强网杯全国网络安全挑战赛 Pwn题目chat-with-me源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功