summaryrefslogtreecommitdiff
path: root/chromium/tools/polymer/html_to_js.gni
blob: 4c2fec623156b0360fd03ae1709eed2f694f8d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

template("html_to_js") {
  action(target_name) {
    script = "//tools/polymer/html_to_js.py"

    inputs = []
    outputs = []

    foreach(js_file, invoker.js_files) {
      html_file = get_path_info(js_file, "name") + ".html"
      inputs += [
        js_file,
        html_file,
      ]
      outputs += [ "$target_gen_dir/" + js_file ]
    }

    args = [
             "--in_folder",
             rebase_path(".", root_build_dir),
             "--out_folder",
             rebase_path(target_gen_dir, root_build_dir),
             "--js_files",
           ] + invoker.js_files
  }
}