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

Unified Diff: third_party/closure_compiler/compile.py

Issue 1128843007: Add tests for third_party/closure_compiler/compile.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move out_dir creation to _run_js_check() Created 5 years, 7 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
« no previous file with comments | « no previous file | third_party/closure_compiler/compiler_customization_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/compile.py
diff --git a/third_party/closure_compiler/compile.py b/third_party/closure_compiler/compile.py
index 091a8470e3da888fb6a69cfda341c9422e9ea65d..f39f94f3380c79cd5fa224763685863a7f55d20f 100755
--- a/third_party/closure_compiler/compile.py
+++ b/third_party/closure_compiler/compile.py
@@ -270,6 +270,9 @@ class Checker(object):
args = ["--js=%s" % s for s in sources]
if out_file:
+ out_dir = os.path.dirname(out_file)
+ if not os.path.exists(out_dir):
+ os.makedirs(out_dir)
args += ["--js_output_file=%s" % out_file]
args += ["--create_source_map=%s" % (self._MAP_FILE_FORMAT % out_file)]
@@ -419,11 +422,6 @@ if __name__ == "__main__":
'polymer-externs', 'polymer.externs.js')
externs.add(polymer_externs)
- if opts.out_file:
- out_dir = os.path.dirname(opts.out_file)
- if not os.path.exists(out_dir):
- os.makedirs(out_dir)
-
checker = Checker(verbose=opts.verbose, strict=opts.strict)
if opts.single_file:
for source in opts.sources:
« no previous file with comments | « no previous file | third_party/closure_compiler/compiler_customization_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698