Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: third_party/closure_compiler/compile_js2.gni

Issue 2094193004: Strip comments and whitespace from Javascript resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments, plus rebases. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//third_party/closure_compiler/closure_args.gni")
6
7 closure_compiler_dir = "//third_party/closure_compiler"
8
9 template("compile_js2_foreach") {
10 action_foreach(target_name) {
11 sources = invoker.sources
12 script = "$closure_compiler_dir/compile2.py"
13 output_name =
14 "{{source_gen_dir}}/closure_${target_name}/{{source_file_part}}"
15 outputs = [
16 output_name,
17 ]
18 closure_args = common_closure_args
19
20 if (defined(invoker.strip_whitespace) && invoker.strip_whitespace) {
21 closure_args += [ "compilation_level=WHITESPACE_ONLY" ]
22 } else {
23 closure_args +=
24 typecheck_closure_args + [ "compilation_level=SIMPLE_OPTIMIZATIONS" ]
25 }
26
27 args = [
28 "{{source}}",
29 "--out_file",
30 rebase_path("$root_out_dir/$output_name"),
31 "--closure_args",
32 ] + closure_args + default_disabled_closure_args
33 deps = invoker.deps
34 }
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698