OLD | NEW |
| (Empty) |
1 # Copyright 2014 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 | |
5 # Include this file in a target to copy all necessary files to satisfy | |
6 # the transitive dependencies of a set of top-level JavaScript files | |
7 # using closure-style dependency declarations. The following variables | |
8 # must be available when this file is included: | |
9 # js_root_flags: List of '-r' flags to jsbundler.py for locating the | |
10 # .js files. | |
11 # path_rewrite_flags: '-w' flags to jsbundler.py to replace source path | |
12 # prefixes at the destination. | |
13 # dest_dir: Destination directory for all copied files. | |
14 | |
15 { | |
16 'actions': [ | |
17 { | |
18 'action_name': 'copy_js', | |
19 'message': 'Copy JS for <(_target_name)', | |
20 'variables': { | |
21 'js_bundler_path': 'tools/jsbundler.py', | |
22 'js_files': [ | |
23 '<!@(python <(js_bundler_path) <(js_root_flags) <(_sources))' | |
24 ], | |
25 }, | |
26 'inputs': [ | |
27 '<(js_bundler_path)', | |
28 '<@(js_files)', | |
29 ], | |
30 'outputs': [ | |
31 # dest_dir is quoted below because it can contain build system | |
32 # variables such as PRODUCT_DIR that need to be passed back | |
33 # literally. | |
34 '<!@(python <(js_bundler_path) <@(path_rewrite_flags) -d \'<(dest_dir)\'
<@(js_files))' | |
35 ], | |
36 'action': [ | |
37 'python', | |
38 '<(js_bundler_path)', | |
39 '-m', 'copy', | |
40 '-d', '<(dest_dir)', | |
41 '<@(path_rewrite_flags)', | |
42 '<@(js_files)', | |
43 ], | |
44 }, | |
45 ] | |
46 } | |
OLD | NEW |