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

Unified Diff: chrome/browser/resources/polymer_css_build_gn.py

Issue 2698143003: [MD WebUI] Polymer-CSS-Build across all bundles. (Closed)
Patch Set: address comments Created 3 years, 10 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 | « chrome/browser/resources/md_history/BUILD.gn ('k') | chrome/browser/resources/vulcanize.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/polymer_css_build_gn.py
diff --git a/chrome/browser/resources/polymer_css_build_gn.py b/chrome/browser/resources/polymer_css_build_gn.py
new file mode 100755
index 0000000000000000000000000000000000000000..7a55fde3c1609b140f3ff8832611584d8e4b9d69
--- /dev/null
+++ b/chrome/browser/resources/polymer_css_build_gn.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import argparse
+import os
+import sys
+
+_HERE_PATH = os.path.dirname(__file__)
+_SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..'))
+_CWD = os.getcwd()
+
+sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'node'))
+import node
+import node_modules
+
+def _css_build(out_folder, input_files, output_files):
+ out_path = os.path.join(_CWD, out_folder)
+ in_paths = map(lambda f: os.path.join(out_path, f), input_files)
+ out_paths = map(lambda f: os.path.join(out_path, f), output_files)
+
+ node.RunNode([node_modules.PathToPolymerCssBuild(), '-f'] + in_paths +
+ ['-o'] + out_paths)
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--out_folder')
+ parser.add_argument('--input_files', nargs='+')
+ parser.add_argument('--output_files', nargs='+')
+ args = parser.parse_args()
+
+ _css_build(
+ args.out_folder,
+ input_files=args.input_files,
+ output_files=args.output_files)
+
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « chrome/browser/resources/md_history/BUILD.gn ('k') | chrome/browser/resources/vulcanize.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698