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

Side by Side Diff: third_party/closure_compiler/js_library.py

Issue 2800833004: Create js_library and js_binary templates for closure compiling. (Closed)
Patch Set: . Created 3 years, 8 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 2017 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 """Generates a file describing the js_library to be used by js_binary action.
5
6 This script takes in a list of sources and dependencies as described by a
7 js_library action. It creates a file listing the sources and dependencies
8 that can later be used by a js_binary action to compile the javascript.
9 """
10
11 from argparse import ArgumentParser
12 import sys
13
14 def main():
15 parser = ArgumentParser()
16 parser.add_argument('-s', '--sources', nargs='*', default = [],
17 help='List of js source files')
18 parser.add_argument('-o', '--output', help='Write list to output')
19 parser.add_argument('-d', '--deps', nargs='*', default = [],
20 help='List of js_library dependencies')
21 args = parser.parse_args()
22
23 with file(args.output, 'w') as out:
mbjorge 2017/04/10 20:07:59 with open()
24 out.write('sources:\n')
25 for s in args.sources:
26 out.write(s + '\n')
27 out.write('deps:\n')
28 for d in args.deps:
29 out.write(d + '\n')
30
31 if __name__ == '__main__':
32 sys.exit(main())
OLDNEW
« third_party/closure_compiler/compile_js.gni ('K') | « third_party/closure_compiler/js_binary.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698