Debian Codegraph @

debian/closure-compiler.1.tmp

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .TH CLOSURE-COMPILER 1 "2014-01-07" "" "Closure"
4 .SH NAME
5 closure-compiler \- optimising compiler for ECMAScript (JavaScript) programs
6 .
7 .nr rst2man-indent-level 0
8 .
9 .de1 rstReportMargin
10 \\$1 \\n[an-margin]
11 level \\n[rst2man-indent-level]
12 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
13 -
14 \\n[rst2man-indent0]
15 \\n[rst2man-indent1]
16 \\n[rst2man-indent2]
17 ..
18 .de1 INDENT
19 .\" .rstReportMargin pre:
20 . RS \\$1
21 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22 . nr rst2man-indent-level +1
23 .\" .rstReportMargin post:
24 ..
25 .de UNINDENT
26 . RE
27 .\" indent \\n[an-margin]
28 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .nr rst2man-indent-level -1
30 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
32 ..
33 .SH SYNOPSIS
34 .nf
35 \fBclosure\-compiler\fP [ \fIOPTION\fP ... ]
36 \fBclosure\-compiler\fP \fB\-\-help\fP
37 .fi
38 .sp
39 .SH DESCRIPTION
40 .sp
41 The Closure Compiler Application is the command\-line interface to the
42 Closure Compiler, part of the Closure Tools project.
43 .sp
44 The Closure Compiler is a tool for making ECMAScript (JavaScript) download
45 and run faster. It parses your program, analyzes it, removes dead code, and
46 rewrites and minimizes what\(aqs left. It also checks syntax, variable
47 references, and types, and warns about common pitfalls.
48 .SH OPTIONS
49 .sp
50 \fB\-\-help\fP
51 .INDENT 0.0
52 .INDENT 3.5
53 Describe how to use the Closure Compiler Application.
54 .UNINDENT
55 .UNINDENT
56 .sp
57 \fB\-\-version\fP
58 .INDENT 0.0
59 .INDENT 3.5
60 Print the Closure Compiler version to stderr.
61 .UNINDENT
62 .UNINDENT
63 .sp
64 \fB\-\-accept_const_keyword\fP
65 .INDENT 0.0
66 .INDENT 3.5
67 Allow usage of const keyword.
68 .UNINDENT
69 .UNINDENT
70 .sp
71 \fB\-\-angular_pass\fP
72 .INDENT 0.0
73 .INDENT 3.5
74 Generate $inject properties for AngularJS for functions annotated with
75 \fB@ngInject\fP\&.
76 .UNINDENT
77 .UNINDENT
78 .sp
79 \fB\-\-charset\fP \fICHARSET\fP
80 .INDENT 0.0
81 .INDENT 3.5
82 Specify \fICHARSET\fP to be the input and output charset for all files. By
83 default, we accept UTF\-8 as input and output US_ASCII.
84 .UNINDENT
85 .UNINDENT
86 .sp
87 \fB\-\-closure_entry_point\fP \fIENTRYPOINT\fP
88 .INDENT 0.0
89 .INDENT 3.5
90 Specify entry point \fIENTRYPOINT\fP to the program. Must be goog.provide\(aqd
91 symbols. Any goog.provide\(aqd symbols that are not a transitive
92 dependency of the entry points will be removed. Files without
93 goog.provides, and their dependencies, will always be left in. If any
94 entry points are specified, then the \fBmanage_closure_dependencies\fP
95 option will be set to true and all files will be sorted in dependency
96 order.
97 .UNINDENT
98 .UNINDENT
99 .sp
100 \fB\-\-common_js_entry_module\fP \fIMODULEFILE\fP
101 .INDENT 0.0
102 .INDENT 3.5
103 Specify the root of your common JS dependency hierarchy to be
104 \fIMODULEFILE\fP\&. Your main script.
105 .UNINDENT
106 .UNINDENT
107 .sp
108 \fB\-\-common_js_module_path_prefix\fP \fIPREFIX\fP
109 .INDENT 0.0
110 .INDENT 3.5
111 Specify a path prefix \fIPREFIX\fP to be removed from CommonJS module
112 names.
113 .UNINDENT
114 .UNINDENT
115 .sp
116 \fB\-\-compilation_level\fP \fILEVEL\fP
117 .INDENT 0.0
118 .INDENT 3.5
119 Set the compilation level to \fILEVEL\fP\&.
120 .sp
121 Values: \fBWHITESPACE_ONLY\fP, \fBSIMPLE_OPTIMIZATIONS\fP,
122 \fBADVANCED_OPTIMIZATIONS\fP\&.
123 .UNINDENT
124 .UNINDENT
125 .sp
126 \fB\-\-create_name_map_files\fP
127 .INDENT 0.0
128 .INDENT 3.5
129 Specify that variable renaming and property renaming map files will be
130 produced as {binary name}_vars_map.out and {binary name}_props_map.out.
131 .sp
132 Note that this flag cannot be used in conjunction with either
133 \fBvariable_map_output_file\fP or \fBproperty_map_output_file\fP\&.
134 .UNINDENT
135 .UNINDENT
136 .sp
137 \fB\-\-create_source_map\fP \fIMAPFILE\fP
138 .INDENT 0.0
139 .INDENT 3.5
140 Specify a source map file \fIMAPFILE\fP, mapping the generated source files
141 back to the original source file will be output to the specified path.
142 The \fB%outname%\fP placeholder will expand to the name of the output file
143 that the source map corresponds to.
144 .UNINDENT
145 .UNINDENT
146 .sp
147 \fB\-\-debug\fP
148 .INDENT 0.0
149 .INDENT 3.5
150 Enable debugging options.
151 .UNINDENT
152 .UNINDENT
153 .sp
154 \fB\-\-define\fP \fIDEFINITION\fP, \fB\-\-D\fP \fIDEFINITION\fP, \fB\-D\fP \fIDEFINITION\fP
155 .INDENT 0.0
156 .INDENT 3.5
157 Override the value of a variable annotated @define. The format of
158 \fIDEFINITION\fP is <name>[=<val>], where <name> is the name of a @define
159 variable and <val> is a boolean, number, or a single\-quot ed string
160 that contains no single quotes. If [=<val>] is omitted, the variable is
161 marked true.
162 .UNINDENT
163 .UNINDENT
164 .sp
165 \fB\-\-externs\fP \fIEXTERNFILE\fP
166 .INDENT 0.0
167 .INDENT 3.5
168 Specify that the file \fIEXTERNFILE\fP contains JavaScript externs.
169 .sp
170 You may specify this option multiple times to specify additional
171 \fIEXTERNFILE\fP files.
172 .UNINDENT
173 .UNINDENT
174 .sp
175 \fB\-\-extra_annotation_name\fP \fITAGNAME\fP
176 .INDENT 0.0
177 .INDENT 3.5
178 Specify \fITAGNAME\fP to append to the whitelist of tag names in JSDoc.
179 .sp
180 You may specify this option multiple times to append additional
181 \fITAGNAME\fP values.
182 .UNINDENT
183 .UNINDENT
184 .sp
185 \fB\-\-flagfile\fP \fIFILE\fP
186 .INDENT 0.0
187 .INDENT 3.5
188 Specify that \fIFILE\fP contains additional command\-line options.
189 .UNINDENT
190 .UNINDENT
191 .sp
192 \fB\-\-formatting\fP \fIFORMATOPTION\fP
193 .INDENT 0.0
194 .INDENT 3.5
195 Specifies the formatting option \fIFORMATOPTION\fP to apply to the output
196 JS.
197 .sp
198 Values: \fBPRETTY_PRINT\fP, \fBPRINT_INPUT_DELIMITER\fP, \fBSINGLE_QUOTES\fP
199 .UNINDENT
200 .UNINDENT
201 .sp
202 \fB\-\-generate_exports\fP
203 .INDENT 0.0
204 .INDENT 3.5
205 Generates export code for those marked with @export.
206 .UNINDENT
207 .UNINDENT
208 .sp
209 \fB\-\-js\fP \fIINFILE\fP
210 .INDENT 0.0
211 .INDENT 3.5
212 Specify \fIINFILE\fP as an input filename.
213 .sp
214 You may specify this option multiple times to append additional
215 \fIINFILE\fP names.
216 .UNINDENT
217 .UNINDENT
218 .sp
219 \fB\-\-js_output_file\fP \fIOUTFILE\fP
220 .INDENT 0.0
221 .INDENT 3.5
222 Specify \fIOUTFILE\fP as the primary output filename.
223 .sp
224 If not specified, output is written to stdout.
225 .UNINDENT
226 .UNINDENT
227 .sp
228 \fB\-\-jscomp_error\fP \fIWARNCLASS\fP
229 .INDENT 0.0
230 .INDENT 3.5
231 Make the named class of warnings \fIWARNCLASS\fP an error.
232 .sp
233 See \fI\%Warning Classes\fP, below, for the list of valid \fIWARNCLASS\fP names.
234 .UNINDENT
235 .UNINDENT
236 .sp
237 \fB\-\-jscomp_off\fP \fIWARNCLASS\fP
238 .INDENT 0.0
239 .INDENT 3.5
240 Turn off the named class of warnings \fIWARNCLASS\fP\&.
241 .sp
242 See \fI\%Warning Classes\fP, below, for the list of valid \fIWARNCLASS\fP names.
243 .UNINDENT
244 .UNINDENT
245 .sp
246 \fB\-\-jscomp_warning\fP \fIWARNCLASS\fP
247 .INDENT 0.0
248 .INDENT 3.5
249 Make the named class of warnings \fIWARNCLASS\fP a normal warning.
250 .sp
251 See \fI\%Warning Classes\fP, below, for the list of valid \fIWARNCLASS\fP names.
252 .UNINDENT
253 .UNINDENT
254 .sp
255 \fB\-\-language_in\fP \fILANGSPEC\fP
256 .INDENT 0.0
257 .INDENT 3.5
258 Specify the input sources conform to the language \fILANGSPEC\fP\&.
259 .sp
260 Values: \fBECMASCRIPT3\fP (default), \fBECMASCRIPT5\fP,
261 \fBECMASCRIPT5_STRICT\fP\&.
262 .UNINDENT
263 .UNINDENT
264 .sp
265 \fB\-\-logging_level\fP \fILEVEL\fP
266 .INDENT 0.0
267 .INDENT 3.5
268 Specify \fILEVEL\fP as the logging level (standard java.util. logging.Level
269 values) for Compiler progress. Does not control errors or warnings for
270 the JavaScript code under compilation.
271 .UNINDENT
272 .UNINDENT
273 .sp
274 \fB\-\-manage_closure_dependencies\fP
275 .INDENT 0.0
276 .INDENT 3.5
277 Automatically sort dependencies so that a file that goog.provides
278 symbol X will always come before a file that goog.requires symbol X. If
279 an input provides symbols, and those symbols are never required, then
280 that input will not be included in the compilation.
281 .UNINDENT
282 .UNINDENT
283 .sp
284 \fB\-\-module\fP \fIMODULESPEC\fP
285 .INDENT 0.0
286 .INDENT 3.5
287 Specify the JavaScript module specification \fIMODULESPEC\fP\&.
288 .sp
289 The format for \fIMODULESPEC\fP is <name>:<num\-js\-files>[:[<dep>,...][:]]].
290 Module names must be unique. Each dep is the name of a module that this
291 module depends on. Modules must be listed in dependency order, and JS
292 source files must be listed in the corresponding order. Where
293 \fB\-\-module\fP flags occur in relation to \fB\-\-js\fP flags is unimportant.
294 Provide the value \fBauto\fP to trigger module creation from
295 CommonJSmodules.
296 .UNINDENT
297 .UNINDENT
298 .sp
299 \fB\-\-module_output_path_prefix\fP \fIPREFIX\fP
300 .INDENT 0.0
301 .INDENT 3.5
302 Specify the filename prefix \fIPREFIX\fP for filenames of compiled JS
303 modules. <module\-name>.js will be appended to this prefix. Directories
304 will be created as needed. Use with \fB\-\-module\fP\&.
305 .UNINDENT
306 .UNINDENT
307 .sp
308 \fB\-\-module_wrapper\fP \fIWRAPPER\fP
309 .INDENT 0.0
310 .INDENT 3.5
311 Specify \fIWRAPPER\fP as output wrapper for a JavaScript module (optional).
312 .sp
313 The format of \fIWRAPPER\fP is <name>:<wrapper>. The module name must
314 correspond with a module specified using \fB\-\-module\fP\&. The wrapper must
315 contain %s as the code placeholder. The %basename% placeholder can also
316 be used to substitute the base name of the module output file.
317 .UNINDENT
318 .UNINDENT
319 .sp
320 \fB\-\-only_closure_dependencies\fP
321 .INDENT 0.0
322 .INDENT 3.5
323 Only include files in the transitive dependency of the entry points
324 (specified by closure_entry_point). Files that do not provide
325 dependencies will be removed. This supersedes
326 \fBmanage_closure_dependencies\fP\&.
327 .UNINDENT
328 .UNINDENT
329 .sp
330 \fB\-\-output_manifest\fP \fIMANIFESTFILE\fP
331 .INDENT 0.0
332 .INDENT 3.5
333 Prints out a list of all the files in the compilation to
334 \fIMANIFESTFILE\fP\&.
335 .sp
336 If \fB\-\-manage_closure_dependencies\fP is on, this will not include files
337 that got dropped because they were not required.
338 .sp
339 The \fB%outname%\fP placeholder expands to the JS output file. If you\(aqre
340 using modularization, using \fB%outname%\fP will create a manifest for
341 each module.
342 .UNINDENT
343 .UNINDENT
344 .sp
345 \fB\-\-output_module_dependencies\fP \fIDEPFILE\fP
346 .INDENT 0.0
347 .INDENT 3.5
348 Prints out a JSON file \fIDEPFILE\fP of dependencies between modules.
349 .UNINDENT
350 .UNINDENT
351 .sp
352 \fB\-\-output_wrapper\fP \fIWRAPPER\fP
353 .INDENT 0.0
354 .INDENT 3.5
355 Interpolate output into \fIWRAPPER\fP at the place denoted by the marker
356 token \fB%output%\fP\&. Use marker token \fB%output|jsstring%\fP to do js
357 string escaping on the output.
358 .UNINDENT
359 .UNINDENT
360 .sp
361 \fB\-\-print_ast\fP
362 .INDENT 0.0
363 .INDENT 3.5
364 Print a dot file describing the internal abstract syntax tree and exit.
365 .UNINDENT
366 .UNINDENT
367 .sp
368 \fB\-\-print_pass_graph\fP
369 .INDENT 0.0
370 .INDENT 3.5
371 Print a dot file describing the passes that will get run and exit.
372 .UNINDENT
373 .UNINDENT
374 .sp
375 \fB\-\-print_tree\fP
376 .INDENT 0.0
377 .INDENT 3.5
378 Print out the parse tree and exit.
379 .UNINDENT
380 .UNINDENT
381 .sp
382 \fB\-\-process_closure_primitives\fP
383 .INDENT 0.0
384 .INDENT 3.5
385 Processes built\-ins from the Closure library, such as goog.require(),
386 goog.provide(), and goog.exportSymbol().
387 .UNINDENT
388 .UNINDENT
389 .sp
390 \fB\-\-process_common_js_modules\fP
391 .INDENT 0.0
392 .INDENT 3.5
393 Process CommonJS modules to a concatenable form.
394 .UNINDENT
395 .UNINDENT
396 .sp
397 \fB\-\-process_jquery_primitives\fP
398 .INDENT 0.0
399 .INDENT 3.5
400 Processes built\-ins from the JQuery library, such as jQuery.fn and
401 jQuery.extend().
402 .UNINDENT
403 .UNINDENT
404 .sp
405 \fB\-\-property_map_input_file\fP \fIMAPFILE\fP
406 .INDENT 0.0
407 .INDENT 3.5
408 Specify \fIMAPFILE\fP as containing the serialized version of the property
409 renaming map produced by a previous compilation.
410 .UNINDENT
411 .UNINDENT
412 .sp
413 \fB\-\-property_map_output_file\fP \fIMAPFILE\fP
414 .INDENT 0.0
415 .INDENT 3.5
416 Save the serialized version of the property renaming map produced to
417 \fIMAPFILE\fP\&.
418 .UNINDENT
419 .UNINDENT
420 .sp
421 \fB\-\-source_map_format\fP \fIFORMAT\fP
422 .INDENT 0.0
423 .INDENT 3.5
424 Product the source map in format \fIFORMAT\fP\&.
425 .sp
426 Values: \fBV1\fP, \fBV2\fP, \fBV3\fP, \fBDEFAULT\fP\&. \fBDEFAULT\fP produces
427 \fBV2\fP\&.
428 .UNINDENT
429 .UNINDENT
430 .sp
431 \fB\-\-summary_detail_level\fP \fILEVEL\fP
432 .INDENT 0.0
433 .INDENT 3.5
434 Specify the compilation summary detail level \fILEVEL\fP\&.
435 .sp
436 Values: \fB0\fP (never print summary), \fB1\fP (print summary only if there
437 are errors or warnings), \fB2\fP (print summary if the \(aqcheckTypes\(aq
438 diagnostic group is enabled, see \fB\-\-jscomp_warning\fP), \fB3\fP (always
439 print summary). The default level is \fB1\fP\&.
440 .UNINDENT
441 .UNINDENT
442 .sp
443 \fB\-\-third_party\fP
444 .INDENT 0.0
445 .INDENT 3.5
446 Check source validity but do not enforce Closure style rules and
447 conventions.
448 .UNINDENT
449 .UNINDENT
450 .sp
451 \fB\-\-transform_amd_modules\fP
452 .INDENT 0.0
453 .INDENT 3.5
454 Transform AMD to CommonJS modules.
455 .UNINDENT
456 .UNINDENT
457 .sp
458 \fB\-\-translations_file\fP \fITRANSFILE\fP
459 .INDENT 0.0
460 .INDENT 3.5
461 Specify \fITRANSFILE\fP as the source of translated messages. Currently
462 only supports XTB.
463 .UNINDENT
464 .UNINDENT
465 .sp
466 \fB\-\-translations_project\fP \fIPROJECT\fP
467 .INDENT 0.0
468 .INDENT 3.5
469 Scope all translations to the specified project.
470 .sp
471 When specified, use different message ids so that messages in different
472 projects can have different translations.
473 .UNINDENT
474 .UNINDENT
475 .sp
476 \fB\-\-use_only_custom_externs\fP
477 .INDENT 0.0
478 .INDENT 3.5
479 Specifies that the default externs should be excluded.
480 .UNINDENT
481 .UNINDENT
482 .sp
483 \fB\-\-use_types_for_optimization\fP
484 .INDENT 0.0
485 .INDENT 3.5
486 Experimental: perform additional optimizations based on available
487 information. Inaccurate type annotations may result in incorrect
488 results.
489 .UNINDENT
490 .UNINDENT
491 .sp
492 \fB\-\-variable_map_input_file\fP \fIMAPFILE\fP
493 .INDENT 0.0
494 .INDENT 3.5
495 Specify \fIMAPFILE\fP as containing the serialized version of the variable
496 renaming map produced by a previous compilation.
497 .UNINDENT
498 .UNINDENT
499 .sp
500 \fB\-\-variable_map_output_file\fP \fIMAPFILE\fP
501 .INDENT 0.0
502 .INDENT 3.5
503 Save the serialized version of the variable renaming map produced to
504 \fIMAPFILE\fP\&.
505 .UNINDENT
506 .UNINDENT
507 .sp
508 \fB\-\-warning_level\fP \fILEVEL\fP
509 .INDENT 0.0
510 .INDENT 3.5
511 Specify the warning level to use.
512 .sp
513 Values: \fBQUIET\fP, \fBDEFAULT\fP, \fBVERBOSE\fP\&.
514 .UNINDENT
515 .UNINDENT
516 .sp
517 \fB\-\-warnings_whitelist_file\fP \fILISTFILE\fP
518 .INDENT 0.0
519 .INDENT 3.5
520 Suppress warnings listed in \fILISTFILE\fP\&. Each line should be of the form
521 <file\-name>:<line\-number>? <warning\-d escription>
522 .UNINDENT
523 .UNINDENT
524 .SS Warning Classes
525 .sp
526 The \fBjscomp_error\fP, \fBjscomp_warning\fP, and \fBjscomp_off\fP flags
527 require as a parameter a \fIWARNCLASS\fP warning class name. The following
528 names are valid warning class names:
529 .INDENT 0.0
530 .IP \(bu 2
531 \fBaccessControls\fP
532 .IP \(bu 2
533 \fBambiguousFunctionDecl\fP
534 .IP \(bu 2
535 \fBcheckRegExp\fP
536 .IP \(bu 2
537 \fBcheckTypes\fP
538 .IP \(bu 2
539 \fBcheckVars\fP
540 .IP \(bu 2
541 \fBconst\fP
542 .IP \(bu 2
543 \fBconstantProperty\fP
544 .IP \(bu 2
545 \fBdeprecated\fP
546 .IP \(bu 2
547 \fBduplicateMessage\fP
548 .IP \(bu 2
549 \fBes5Strict\fP
550 .IP \(bu 2
551 \fBexternsValidation\fP
552 .IP \(bu 2
553 \fBfileoverviewTags\fP
554 .IP \(bu 2
555 \fBglobalThis\fP
556 .IP \(bu 2
557 \fBinternetExplorerChecks\fP
558 .IP \(bu 2
559 \fBinvalidCasts\fP
560 .IP \(bu 2
561 \fBmisplacedTypeAnnotation\fP
562 .IP \(bu 2
563 \fBmissingProperties\fP
564 .IP \(bu 2
565 \fBnonStandardJsDocs\fP
566 .IP \(bu 2
567 \fBsuspiciousCode\fP
568 .IP \(bu 2
569 \fBstrictModuleDepCheck\fP
570 .IP \(bu 2
571 \fBtypeInvalidation\fP
572 .IP \(bu 2
573 \fBundefinedNames\fP
574 .IP \(bu 2
575 \fBundefinedVars\fP
576 .IP \(bu 2
577 \fBunknownDefines\fP
578 .IP \(bu 2
579 \fBuselessCode\fP
580 .IP \(bu 2
581 \fBvisibility\fP
582 .UNINDENT
583 .SH EXAMPLE
584 .INDENT 0.0
585 .IP \(bu 2
586 .nf
587 \fBclosure\-compiler\fP \-\-js hello.js \-\-js_output_file hello\-compiled.js
588 .fi
589 .sp
590 .sp
591 This command creates a new file called \fBhello\-compiled.js\fP, which
592 contains the compiled program.
593 .UNINDENT
594 .SH HISTORY
595 .sp
596 The Closure Tools project is an effort by Google engineers to open source
597 the tools used in many of Google\(aqs sites and web applications for use by
598 the wider Web development community.
599 .sp
600 This manual page was written by Ben Finney <\fI\%[email protected]\fP> to document the \fBclosure\-compiler\fP command
601 for Debian. It is free software and may be used by others under the terms
602 of the Apache license, version 2.0\&.
603 .\" Local variables:
604 .\" mode: rst
605 .\" coding: utf-8
606 .\" time-stamp-format: "%:y-%02m-%02d"
607 .\" time-stamp-start: "^:Date:[ ]+"
608 .\" time-stamp-end: "$"
609 .\" time-stamp-line-limit: 20
610 .\" End:
611 .\" vim: filetype=rst fileencoding=utf-8 :
612 .
613 .SH AUTHOR
614 Ben Finney <[email protected]>
615 .SH COPYRIGHT
616 Apache license, version 2.0.
617 .\" Generated by docutils manpage writer.
618 .