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

Unified Diff: tools/grit/grit_rule.gni

Issue 2179033002: Strip comments and whitespace from javascript resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One minor fix 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 side-by-side diff with in-line comments
Download patch
« tools/grit/grit/format/html_inline.py ('K') | « tools/grit/grit/tool/build.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit_rule.gni
diff --git a/tools/grit/grit_rule.gni b/tools/grit/grit_rule.gni
index b77a24d5e6fb3f2f429bb47c8f71fcea2941774e..4940775f53bde891d5d9a86ed85b3d642574d008 100644
--- a/tools/grit/grit_rule.gni
+++ b/tools/grit/grit_rule.gni
@@ -303,6 +303,8 @@ if (mac_views_browser) {
grit_resource_id_file = "//tools/gritsettings/resource_ids"
grit_info_script = "//tools/grit/grit_info.py"
+js_minifier = rebase_path("//third_party/closure_compiler/js_minify.py")
+
template("grit") {
assert(defined(invoker.source),
"\"source\" must be defined for the grit template $target_name")
@@ -441,6 +443,13 @@ template("grit") {
args += grit_flags + assert_files_flags
+ if (strip_resource_files) {
+ args += [
+ "--js-minifier",
+ js_minifier,
+ ]
+ }
+
if (defined(invoker.visibility)) {
# This needs to include both what the invoker specified (since they
# probably include generated headers from this target), as well as the
« tools/grit/grit/format/html_inline.py ('K') | « tools/grit/grit/tool/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698