Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | |
|
dpapad
2017/02/16 18:58:09
2017
calamity
2017/02/17 00:24:04
Done.
| |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import argparse | |
| 7 import os | |
| 8 import sys | |
| 9 | |
| 10 _HERE_PATH = os.path.dirname(__file__) | |
| 11 _SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..')) | |
| 12 _CWD = os.getcwd() | |
| 13 | |
| 14 sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'node')) | |
| 15 import node | |
| 16 import node_modules | |
| 17 | |
| 18 def _css_build(out_folder, input_files, output_files): | |
| 19 out_path = os.path.join(_CWD, out_folder) | |
| 20 in_paths = map(lambda f: os.path.join(out_path, f), input_files) | |
| 21 out_paths = map(lambda f: os.path.join(out_path, f), output_files) | |
| 22 | |
| 23 node.RunNode([node_modules.PathToPolymerCssBuild(), '-f'] + in_paths + | |
|
dpapad
2017/02/16 18:58:09
Did you investigate at all whether we were missing
calamity
2017/02/17 00:24:04
I'll start looking now.
| |
| 24 ['-o'] + out_paths) | |
| 25 | |
| 26 | |
| 27 def main(): | |
| 28 parser = argparse.ArgumentParser() | |
| 29 parser.add_argument('--out_folder') | |
| 30 parser.add_argument('--input_files', nargs='+') | |
| 31 parser.add_argument('--output_files', nargs='+') | |
| 32 args = parser.parse_args() | |
| 33 | |
| 34 _css_build( | |
| 35 args.out_folder, | |
| 36 input_files=args.input_files, | |
| 37 output_files=args.output_files) | |
| 38 | |
| 39 | |
| 40 if __name__ == '__main__': | |
| 41 main() | |
| OLD | NEW |