This is the command closure-compiler that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator
CHƯƠNG TRÌNH:
TÊN
closure-compiler - optimising compiler for ECMAScript (JavaScript) programs
SYNOPSIS
closure-compiler [ TÙY CHỌN ...]
closure-compiler --Cứu giúp
MÔ TẢ
The Closure Compiler Application is the command-line interface to the Closure Compiler,
part of the Closure Tools project.
The Closure Compiler is a tool for making ECMAScript (JavaScript) download and run faster.
It parses your program, analyzes it, removes dead code, and rewrites and minimizes what's
left. It also checks syntax, variable references, and types, and warns about common
cạm bẫy.
LỰA CHỌN
--Cứu giúp
Describe how to use the Closure Compiler Application.
--phiên bản
Print the Closure Compiler version to stderr.
--accept_const_keyword
Allow usage of const keyword.
--angular_pass
Generate $inject properties for AngularJS for functions annotated with @ngInject.
--bộ ký tự BỘ KÝ
Chỉ định BỘ KÝ to be the input and output charset for all files. By default, we accept
UTF-8 as input and output US_ASCII.
--closure_entry_point ĐIỂM VÀO
Specify entry point ĐIỂM VÀO to the program. Must be goog.provide'd symbols. Any
goog.provide'd symbols that are not a transitive dependency of the entry points will be
removed. Files without goog.provides, and their dependencies, will always be left in.
If any entry points are specified, then the manage_closure_dependencies tùy chọn sẽ là
set to true and all files will be sorted in dependency order.
--common_js_entry_module MODULEFILE
Specify the root of your common JS dependency hierarchy to be MODULEFILE. Your main
kịch bản.
--common_js_module_path_prefix TIẾP ĐẦU NGỮ
Specify a path prefix TIẾP ĐẦU NGỮ to be removed from CommonJS module names.
--compilation_level LEVEL
Set the compilation level to LEVEL.
Giá trị: WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS, ADVANCED_OPTIMIZATIONS.
--create_name_map_files
Specify that variable renaming and property renaming map files will be produced as
{binary name}_vars_map.out and {binary name}_props_map.out.
Note that this flag cannot be used in conjunction with either variable_map_output_file
or property_map_output_file.
--create_source_map BẢN ĐỒ
Specify a source map file BẢN ĐỒ, mapping the generated source files back to the
original source file will be output to the specified path. The %outname% giữ chỗ
will expand to the name of the output file that the source map corresponds to.
--gỡ lỗi
Enable debugging options.
--định nghĩa ĐỊNH NGHĨA, --NS ĐỊNH NGHĨA, -D ĐỊNH NGHĨA
Override the value of a variable annotated @define. The format of ĐỊNH NGHĨA is
<name>[=<val>], where <name> is the name of a @define variable and <val> is a boolean,
number, or a single-quot ed string that contains no single quotes. If [=<val>] is
omitted, the variable is marked true.
--bên ngoài EXTERNFILE
Chỉ định rằng tệp EXTERNFILE contains JavaScript externs.
You may specify this option multiple times to specify additional EXTERNFILE các tập tin.
--extra_annotation_name TAGNAME
Chỉ định TAGNAME to append to the whitelist of tag names in JSDoc.
You may specify this option multiple times to append additional TAGNAME các giá trị.
--flagfile FILE
Chỉ định rằng FILE contains additional command-line options.
- định dạng FORMATOPTION
Specifies the formatting option FORMATOPTION to apply to the output JS.
Giá trị: PRETTY_PRINT, PRINT_INPUT_DELIMITER, SINGLE_QUOTES
--generate_exports
Generates export code for those marked with @export.
--js TRONG TẬP TIN
Chỉ định TRONG TẬP TIN as an input filename.
You may specify this option multiple times to append additional TRONG TẬP TIN tên.
--js_output_file NGOÀI RA
Chỉ định NGOÀI RA as the primary output filename.
If not specified, output is written to stdout.
--jscomp_error WARNCLASS
Make the named class of warnings WARNCLASS một lỗi.
Xem Cảnh báo Các lớp học, below, for the list of valid WARNCLASS tên.
--jscomp_off WARNCLASS
Turn off the named class of warnings WARNCLASS.
Xem Cảnh báo Các lớp học, below, for the list of valid WARNCLASS tên.
--jscomp_warning WARNCLASS
Make the named class of warnings WARNCLASS a normal warning.
Xem Cảnh báo Các lớp học, below, for the list of valid WARNCLASS tên.
--language_in LANGSPEC
Specify the input sources conform to the language LANGSPEC.
Giá trị: ECMASCRIPT3 (Mặc định), ECMASCRIPT5, ECMASCRIPT5_STRICT.
--logging_level LEVEL
Chỉ định LEVEL as the logging level (standard java.util. logging.Level values) for
Compiler progress. Does not control errors or warnings for the JavaScript code under
biên dịch.
--manage_closure_dependencies
Automatically sort dependencies so that a file that goog.provides symbol X will always
come before a file that goog.requires symbol X. If an input provides symbols, and those
symbols are never required, then that input will not be included in the compilation.
- mô-đun MODULESPEC
Specify the JavaScript module specification MODULESPEC.
Định dạng cho MODULESPEC is <name>:<num-js-files>[:[<dep>,...][:]]]. Module names
must be unique. Each dep is the name of a module that this module depends on. Modules
must be listed in dependency order, and JS source files must be listed in the
corresponding order. Where - mô-đun flags occur in relation to --js flags is
unimportant. Provide the value tự động to trigger module creation from CommonJSmodules.
--module_output_path_prefix TIẾP ĐẦU NGỮ
Specify the filename prefix TIẾP ĐẦU NGỮ for filenames of compiled JS modules.
<module-name>.js will be appended to this prefix. Directories will be created as
needed. Use with - mô-đun.
--module_wrapper VỎ BÁNH
Chỉ định VỎ BÁNH as output wrapper for a JavaScript module (optional).
Định dạng của VỎ BÁNH is <name>:<wrapper>. The module name must correspond with a
module specified using - mô-đun. The wrapper must contain %s as the code placeholder.
The %basename% placeholder can also be used to substitute the base name of the module
tập tin đầu ra.
--only_closure_dependencies
Only include files in the transitive dependency of the entry points (specified by
closure_entry_point). Files that do not provide dependencies will be removed. This
thay thế manage_closure_dependencies.
--output_manifest TỆP BẢN BẢN
Prints out a list of all the files in the compilation to TỆP BẢN BẢN.
If --manage_closure_dependencies is on, this will not include files that got dropped
because they were not required.
Sản phẩm %outname% placeholder expands to the JS output file. If you're using
modularization, using %outname% will create a manifest for each module.
--output_module_dependencies DEPFILE
Prints out a JSON file DEPFILE of dependencies between modules.
--output_wrapper VỎ BÁNH
Interpolate output into VỎ BÁNH at the place denoted by the marker token %output%. Sử dụng
marker token %output|jsstring% to do js string escaping on the output.
--print_ast
Print a dot file describing the internal abstract syntax tree and exit.
--print_pass_graph
Print a dot file describing the passes that will get run and exit.
--print_tree
Print out the parse tree and exit.
--process_closure_primitives
Processes built-ins from the Closure library, such as goog.require(), goog.provide(),
and goog.exportSymbol().
--process_common_js_modules
Process CommonJS modules to a concatenable form.
--process_jquery_primitives
Processes built-ins from the JQuery library, such as jQuery.fn and jQuery.extend().
--property_map_input_file BẢN ĐỒ
Chỉ định BẢN ĐỒ as containing the serialized version of the property renaming map
produced by a previous compilation.
--property_map_output_file BẢN ĐỒ
Save the serialized version of the property renaming map produced to BẢN ĐỒ.
--source_map_format FORMAT
Product the source map in format FORMAT.
Giá trị: V1, V2, V3, MẶC ĐỊNH. MẶC ĐỊNH sản xuất V2.
--summary_detail_level LEVEL
Specify the compilation summary detail level LEVEL.
Giá trị: 0 (never print summary), 1 (print summary only if there are errors or
warnings), 2 (print summary if the 'checkTypes' diagnostic group is enabled, see
--jscomp_warning), 3 (always print summary). The default level is 1.
--third_party
Check source validity but do not enforce Closure style rules and conventions.
--transform_amd_modules
Transform AMD to CommonJS modules.
--translations_file TRANSFILE
Chỉ định TRANSFILE as the source of translated messages. Currently only supports XTB.
--translations_project DỰ ÁN(PROJECT)
Scope all translations to the specified project.
When specified, use different message ids so that messages in different projects can
have different translations.
--use_only_custom_externs
Specifies that the default externs should be excluded.
--use_types_for_optimization
Experimental: perform additional optimizations based on available information.
Inaccurate type annotations may result in incorrect results.
--variable_map_input_file BẢN ĐỒ
Chỉ định BẢN ĐỒ as containing the serialized version of the variable renaming map
produced by a previous compilation.
--variable_map_output_file BẢN ĐỒ
Save the serialized version of the variable renaming map produced to BẢN ĐỒ.
--warning_level LEVEL
Specify the warning level to use.
Giá trị: YÊN TĨNH, MẶC ĐỊNH, ĐỘNG TỪ.
--warnings_whitelist_file DANH SÁCH
Suppress warnings listed in DANH SÁCH. Each line should be of the form
<file-name>:<line-number>? <warning-d escription>
Cảnh báo Các lớp học
Sản phẩm jscomp_error, jscomp_warningvà jscomp_off flags require as a parameter a WARNCLASS
warning class name. The following names are valid warning class names:
· accessControls
· ambiguousFunctionDecl
· checkRegExp
· checkTypes
· checkVars
· const
· constantProperty
· phản đối
· duplicateMessage
· es5Strict
· externsValidation
· fileoverviewTags
· globalThis
· internetExplorerChecks
· invalidCasts
· misplacedTypeAnnotation
· missingProperties
· nonStandardJsDocs
· suspiciousCode
· strictModuleDepCheck
· typeInvalidation
· undefinedNames
· undefinedVars
· unknownDefines
· uselessCode
· khả năng hiển thị
THÍ DỤ
·
closure-compiler --js hello.js --js_output_file hello-compiled.js
This command creates a new file called hello-compiled.js, which contains the compiled
chương trình.
LỊCH SỬ
The Closure Tools project is an effort by Google engineers to open source the tools used
in many of Google's sites and web applications for use by the wider Web development
cộng đồng.
Trang hướng dẫn này được viết bởi Ben Finneyben +[email được bảo vệ]> to document
các closure-compiler command for Debian. It is free software and may be used by others
under the terms of the Apache license, version 2.0.
Use closure-compiler online using onworks.net services