fix(elements): include schematics in npm distro (#23350)
PR Close #23350
This commit is contained in:
parent
c2a53bbf61
commit
9fabe2f5fa
|
@ -25,6 +25,9 @@ ng_package(
|
||||||
"**/package.json",
|
"**/package.json",
|
||||||
]),
|
]),
|
||||||
entry_point = "packages/elements/index.js",
|
entry_point = "packages/elements/index.js",
|
||||||
|
packages = [
|
||||||
|
"//packages/elements/schematics:npm_package",
|
||||||
|
],
|
||||||
tags = ["release-with-framework"],
|
tags = ["release-with-framework"],
|
||||||
deps = [
|
deps = [
|
||||||
":elements",
|
":elements",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package(default_visibility = ["//visibility:public"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
load("//tools:defaults.bzl", "ts_library")
|
load("//tools:defaults.bzl", "ts_library", "npm_package")
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
||||||
|
|
||||||
exports_files([
|
exports_files([
|
||||||
|
@ -8,47 +8,6 @@ exports_files([
|
||||||
"collection.json",
|
"collection.json",
|
||||||
])
|
])
|
||||||
|
|
||||||
ts_library(
|
|
||||||
name = "schematics",
|
|
||||||
srcs = glob(
|
|
||||||
[
|
|
||||||
"ng-add/index.ts",
|
|
||||||
"ng-add/schema.d.ts",
|
|
||||||
],
|
|
||||||
),
|
|
||||||
module_name = "@angular/elements/schematics",
|
|
||||||
deps = [
|
|
||||||
"//packages/common",
|
|
||||||
"//packages/core",
|
|
||||||
"@rxjs",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
ts_library(
|
|
||||||
name = "test_lib",
|
|
||||||
testonly = 1,
|
|
||||||
srcs = glob(
|
|
||||||
[
|
|
||||||
"ng-add/index_spec.ts",
|
|
||||||
],
|
|
||||||
),
|
|
||||||
deps = [
|
|
||||||
":schematics",
|
|
||||||
"//packages/common",
|
|
||||||
"//packages/core",
|
|
||||||
"@rxjs",
|
|
||||||
"@rxjs//operators",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
jasmine_node_test(
|
|
||||||
name = "test",
|
|
||||||
data = [":collection"],
|
|
||||||
deps = [
|
|
||||||
":test_lib",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = "collection",
|
name = "collection",
|
||||||
srcs = ["collection.json"],
|
srcs = ["collection.json"],
|
||||||
|
@ -56,3 +15,13 @@ genrule(
|
||||||
cmd = "cp $< $@",
|
cmd = "cp $< $@",
|
||||||
output_to_bindir = 1,
|
output_to_bindir = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
npm_package(
|
||||||
|
name = "npm_package",
|
||||||
|
srcs = [
|
||||||
|
"collection.json",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
"//packages/elements/schematics/ng-add",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
load("//tools:defaults.bzl", "ts_library", "npm_package")
|
||||||
|
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
||||||
|
|
||||||
|
ts_library(
|
||||||
|
name = "ng-add",
|
||||||
|
srcs = glob(
|
||||||
|
[
|
||||||
|
"index.ts",
|
||||||
|
"schema.ts",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
deps = [
|
||||||
|
"//packages/common",
|
||||||
|
"//packages/core",
|
||||||
|
"@rxjs",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
ts_library(
|
||||||
|
name = "test_lib",
|
||||||
|
testonly = 1,
|
||||||
|
srcs = glob(
|
||||||
|
[
|
||||||
|
"index_spec.ts",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
deps = [
|
||||||
|
":ng-add",
|
||||||
|
"//packages/common",
|
||||||
|
"//packages/core",
|
||||||
|
"@rxjs",
|
||||||
|
"@rxjs//operators",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
jasmine_node_test(
|
||||||
|
name = "test",
|
||||||
|
data = [
|
||||||
|
"//packages/elements/schematics:collection.json",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
":test_lib",
|
||||||
|
],
|
||||||
|
)
|
|
@ -1,11 +0,0 @@
|
||||||
export interface Schema {
|
|
||||||
/**
|
|
||||||
* Skip package.json install.
|
|
||||||
*/
|
|
||||||
skipPackageJson: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The project that needs the polyfill scripts
|
|
||||||
*/
|
|
||||||
project: name;
|
|
||||||
}
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* 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.io/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface Schema {
|
||||||
|
/**
|
||||||
|
* Skip package.json install.
|
||||||
|
*/
|
||||||
|
skipPackageJson: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The project that needs the polyfill scripts
|
||||||
|
*/
|
||||||
|
project: string;
|
||||||
|
}
|
Loading…
Reference in New Issue