Skip to content

Commit c7c6898

Browse files
committed
Mention uglify2 as an option for generate sourcemaps, also as general optimize value.
1 parent e2f79a2 commit c7c6898

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

build/example.build.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
//Right now only the following values
8383
//are supported:
8484
//- "uglify": (default) uses UglifyJS to minify the code.
85+
//- "uglify2": in version 2.1.2+. Uses UglifyJS2.
8586
//- "closure": uses Google's Closure Compiler in simple optimization
8687
//mode to minify the code. Only available if running the optimizer using
8788
//Java.
@@ -99,13 +100,16 @@
99100
//files.
100101
skipDirOptimize: false,
101102

102-
//Introduced in 2.1.2: If the minifier specified in the "optimize" option
103-
//supports generating source maps for the minfied code, then generate them.
104-
//The source maps generated only translate minified JS to non-minified
105-
//JS, it does not do anything magical for translating minfied JS to
106-
//transpiled source code.
107-
//Currently only optimize: "closure" when running under Java is supported,
108-
//and only with a closure compiler jar build after r1592 (20111114 release).
103+
//Introduced in 2.1.2 and considered experimental.
104+
//If the minifier specified in the "optimize" option supports generating
105+
//source maps for the minfied code, then generate them. The source maps
106+
//generated only translate minified JS to non-minified JS, it does not do
107+
//anything magical for translating minfied JS to transpiled source code.
108+
//Currently only optimize: "uglify2" is supported when running in node or
109+
//rhino, and if running in rhino, "closure" with a closure compiler jar
110+
//build after r1592 (20111114 release).
111+
//The source files will show up in a browser developer tool that supports
112+
//source maps as ".js.src" files.
109113
generateSourceMaps: false,
110114

111115
//Introduced in 2.1.1: If a full directory optimization ("dir" is used), and
@@ -150,6 +154,11 @@
150154
no_mangle: true
151155
},
152156

157+
//If using UglifyJS for script optimization, these config options can be
158+
//used to pass configuration values to UglifyJS.
159+
//See https://github.com/mishoo/UglifyJS2 for possible values.
160+
uglify2: {},
161+
153162
//If using Closure Compiler for script optimization, these config options
154163
//can be used to configure Closure Compiler. See the documentation for
155164
//Closure compiler for more information.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy