mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
86 lines
1.9 KiB
Python
86 lines
1.9 KiB
Python
# Copyright Google Inc. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by an MIT-style license that can be
|
|
# found in the LICENSE file at https://angular.dev/license
|
|
|
|
load("@npm2//:defs.bzl", "npm_link_all_packages")
|
|
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
|
|
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
|
|
|
licenses(["notice"])
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
npm_link_all_packages()
|
|
|
|
RUNTIME_ASSETS = glob(
|
|
include = [
|
|
"pwa/*.js",
|
|
"pwa/*.mjs",
|
|
"pwa/files/**/*",
|
|
],
|
|
) + [
|
|
"package.json",
|
|
"collection.json",
|
|
"pwa/schema.json",
|
|
]
|
|
|
|
ts_project(
|
|
name = "pwa",
|
|
srcs = [
|
|
"pwa/index.ts",
|
|
"//packages/angular/pwa:pwa/schema.ts",
|
|
],
|
|
data = RUNTIME_ASSETS,
|
|
module_name = "@angular/pwa",
|
|
deps = [
|
|
":node_modules/@angular-devkit/schematics",
|
|
":node_modules/@schematics/angular",
|
|
"//:node_modules/@types/node",
|
|
"//:node_modules/parse5-html-rewriting-stream",
|
|
],
|
|
)
|
|
|
|
ts_json_schema(
|
|
name = "pwa_schema",
|
|
src = "pwa/schema.json",
|
|
)
|
|
|
|
ts_project(
|
|
name = "pwa_test_lib",
|
|
testonly = True,
|
|
srcs = glob(["pwa/**/*_spec.ts"]),
|
|
deps = [
|
|
":node_modules/@angular-devkit/schematics",
|
|
":pwa_rjs",
|
|
"//:node_modules/@types/jasmine",
|
|
"//:node_modules/@types/node",
|
|
],
|
|
)
|
|
|
|
jasmine_test(
|
|
name = "pwa_test",
|
|
data = [":pwa_test_lib_rjs"],
|
|
)
|
|
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["//:LICENSE"],
|
|
outs = ["LICENSE"],
|
|
cmd = "cp $(execpath //:LICENSE) $@",
|
|
)
|
|
|
|
npm_package(
|
|
name = "pkg",
|
|
pkg_deps = [
|
|
"//packages/angular_devkit/schematics:package.json",
|
|
"//packages/schematics/angular:package.json",
|
|
],
|
|
tags = ["release-package"],
|
|
deps = RUNTIME_ASSETS + [
|
|
":README.md",
|
|
":license",
|
|
":pwa_rjs",
|
|
],
|
|
)
|