| # Copyright 2018 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. |
| |
| import("//chrome/common/features.gni") |
| import("//third_party/closure_compiler/compile_js.gni") |
| import("//tools/grit/grit_rule.gni") |
| import("//ui/webui/resources/tools/generate_grd.gni") |
| |
| js_type_check("closure_compile") { |
| deps = [ ":about_webapks" ] |
| } |
| |
| js_library("about_webapks") { |
| deps = [ |
| "//ui/webui/resources/js:cr.m", |
| "//ui/webui/resources/js:util.m", |
| ] |
| externs_list = [ "$externs_path/chrome_send.js" ] |
| } |
| |
| generate_grd("build_grd") { |
| grd_prefix = "webapks" |
| out_grd = "$target_gen_dir/resources.grd" |
| input_files = [ |
| "about_webapks.css", |
| "about_webapks.html", |
| "about_webapks.js", |
| ] |
| input_files_base_dir = rebase_path(".", "//") |
| } |
| |
| grit("resources") { |
| source = "$target_gen_dir/resources.grd" |
| deps = [ ":build_grd" ] |
| enable_input_discovery_for_gn_analyze = false |
| defines = chrome_grit_defines |
| outputs = [ |
| "grit/webapks_resources.h", |
| "grit/webapks_resources_map.cc", |
| "grit/webapks_resources_map.h", |
| "webapks_resources.pak", |
| ] |
| output_dir = "$root_gen_dir/chrome" |
| } |