Lines Matching refs:options

49 function set_shorthand(name, options, keys) {  argument
51 if (options[key]) {
52 if (typeof options[key] != "object") options[key] = {};
53 if (!(name in options[key])) options[key][name] = options[name];
73 function minify(files, options) { argument
75 options = defaults(options, {
92 toplevel: !!(options && options["module"]),
99 if (options.validate) AST_Node.enable_validation();
100 var timings = options.timings && { start: Date.now() };
101 …if (options.annotations !== undefined) set_shorthand("annotations", options, [ "compress", "output…
102 if (options.expression) set_shorthand("expression", options, [ "compress", "parse" ]);
103 if (options.ie8) options.ie = options.ie || options.ie8;
104 if (options.ie) set_shorthand("ie", options, [ "compress", "mangle", "output", "rename" ]);
105 … if (options.keep_fargs) set_shorthand("keep_fargs", options, [ "compress", "mangle", "rename" ]);
106 …if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle", "rename" ]);
107 if (options.module) set_shorthand("module", options, [ "compress", "parse" ]);
108 … if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle", "rename" ]);
109 if (options.v8) set_shorthand("v8", options, [ "mangle", "output", "rename" ]);
110 …if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output", "rename" ]);
112 if (options.mangle) {
113 options.mangle = defaults(options.mangle, {
114 cache: options.nameCache && (options.nameCache.vars || {}),
125 if (options.mangle.properties) {
126 if (typeof options.mangle.properties != "object") {
127 options.mangle.properties = {};
129 if (options.mangle.properties.keep_quoted) {
130 quoted_props = options.mangle.properties.reserved;
132 options.mangle.properties.reserved = quoted_props;
134 if (options.nameCache && !("cache" in options.mangle.properties)) {
135 options.mangle.properties.cache = options.nameCache.props || {};
138 init_cache(options.mangle.cache);
139 init_cache(options.mangle.properties.cache);
141 if (options.rename === undefined) options.rename = options.compress && options.mangle;
142 if (options.sourceMap) {
143 options.sourceMap = defaults(options.sourceMap, {
153 if (options.warnings) AST_Node.log_function(function(warning) {
155 }, options.warnings == "verbose");
158 options.parse = options.parse || {};
163 options.parse.toplevel = null;
164 var source_map_content = options.sourceMap && options.sourceMap.content;
168 if (source_map_content) options.sourceMap.orig = Object.create(null);
170 options.parse.filename = name;
171 options.parse.toplevel = toplevel = parse(files[name], options.parse);
174 … if (inlined_content) options.sourceMap.orig[name] = parse_source_map(inlined_content);
176 options.sourceMap.orig[name] = source_map_content;
180 if (options.parse.expression) toplevel = toplevel.wrap_expression();
183 var option = options[action];
189 if (options.validate) toplevel.validate_ast();
191 if (options.rename) {
192 toplevel.figure_out_scope(options.rename);
193 toplevel.expand_names(options.rename);
196 if (options.compress) {
197 toplevel = new Compressor(options.compress).compress(toplevel);
198 if (options.validate) toplevel.validate_ast();
201 if (options.mangle) toplevel.figure_out_scope(options.mangle);
203 if (options.mangle) {
204 toplevel.compute_char_frequency(options.mangle);
205 toplevel.mangle_names(options.mangle);
209 …if (options.mangle && options.mangle.properties) mangle_properties(toplevel, options.mangle.proper…
210 if (options.parse.expression) toplevel = toplevel.unwrap_expression();
213 var output = defaults(options.output, {
219 if (options.sourceMap) {
220 output.source_map = SourceMap(options.sourceMap);
221 if (options.sourceMap.includeSources) {
234 if (options.sourceMap) {
236 var url = options.sourceMap.url;
247 if (options.nameCache && options.mangle) {
248 if (options.mangle.cache) options.nameCache.vars = to_json(options.mangle.cache);
249 if (options.mangle.properties && options.mangle.properties.cache) {
250 options.nameCache.props = to_json(options.mangle.properties.cache);