Upload upstream chromium 94.0.4606.31
[platform/framework/web/chromium-efl.git] / tools / polymer / html_to_js.gni
1 # Copyright 2020 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 template("html_to_js") {
6   action(target_name) {
7     script = "//tools/polymer/html_to_js.py"
8     forward_variables_from(invoker, [ "visibility" ])
9
10     inputs = []
11     outputs = []
12
13     foreach(js_file, invoker.js_files) {
14       extension = get_path_info(js_file, "extension")
15       assert(extension == "js" || extension == "ts")
16
17       html_file = get_path_info(js_file, "name") + ".html"
18       inputs += [
19         js_file,
20         html_file,
21       ]
22       outputs += [ "$target_gen_dir/" + js_file ]
23     }
24
25     args = [
26              "--in_folder",
27              rebase_path(".", root_build_dir),
28              "--out_folder",
29              rebase_path(target_gen_dir, root_build_dir),
30              "--js_files",
31            ] + invoker.js_files
32   }
33 }