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 produce a bundled and compressed |
| 6 # JavaScript file from a set of files with closure-style dependency |
| 7 # declarations. The following variables must be defined before including |
| 8 # this file: |
| 9 # js_root_flags: List of '-r' flags to jsbundler.py for locating the |
| 10 # .js files. |
| 11 # output_file: path of the compressed JavaScript bundle. |
| 12 # |
| 13 # In addition, the target must have a 'sources' list containing the |
| 14 # top-level files for the bundle. |
| 15 |
| 16 { |
| 17 'actions': [ |
| 18 { |
| 19 'action_name': 'js_compress', |
| 20 'message': 'Compress js for <(_target_name)', |
| 21 'variables': { |
| 22 'js_files': [ |
| 23 '<!@(python tools/jsbundler.py <(js_root_flags) <(_sources))' |
| 24 ], |
| 25 }, |
| 26 'inputs': [ |
| 27 'tools/jsbundler.py', |
| 28 '<@(js_files)', |
| 29 ], |
| 30 'outputs': [ |
| 31 '<(output_file)' |
| 32 ], |
| 33 'action': [ |
| 34 'python', |
| 35 'tools/jsbundler.py', |
| 36 '-m', 'compressed_bundle', |
| 37 '-o', '<(output_file)', |
| 38 '<@(js_files)', |
| 39 ], |
| 40 }, |
| 41 ], |
| 42 } |
OLD | NEW |