Skip to content

Commit 97f3542

Browse files
hanslbbogdanov
authored andcommitted
refactor(@schematics/schematics): automated JSON schema interface generation
1 parent 2ac26ca commit 97f3542

File tree

3 files changed

+87
-36
lines changed

3 files changed

+87
-36
lines changed

packages/schematics/schematics/BUILD

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Copyright Google Inc. All Rights Reserved.
2+
#
3+
# Use of this source code is governed by an MIT-style license that can be
4+
# found in the LICENSE file at https://angular.io/license
5+
6+
licenses(["notice"]) # MIT
7+
8+
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
9+
# load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
10+
load("//tools:ts_json_schema.bzl", "ts_json_schema")
11+
12+
package(default_visibility = ["//visibility:public"])
13+
14+
ts_library(
15+
name = "schematics",
16+
srcs = glob(
17+
include = ["**/*.ts"],
18+
exclude = [
19+
"**/*_spec.ts",
20+
"**/*_spec_large.ts",
21+
"**/*_benchmark.ts",
22+
"schematic/files/**",
23+
"blank/project-files/**",
24+
"blank/schematic-files/**",
25+
],
26+
),
27+
deps = [
28+
":blank_schema",
29+
":schematic_schema",
30+
"//packages/angular_devkit/core",
31+
"//packages/angular_devkit/schematics",
32+
"//packages/angular_devkit/schematics:tasks",
33+
"@rxjs",
34+
"@rxjs//operators",
35+
# @typings: node
36+
],
37+
)
38+
39+
ts_json_schema(
40+
name = "blank_schema",
41+
src = "blank/schema.json",
42+
)
43+
44+
ts_json_schema(
45+
name = "schematic_schema",
46+
src = "schematic/schema.json",
47+
)
48+
49+
# For now we don't have specs.
50+
# ts_library(
51+
# name = "schematics_test_lib",
52+
# srcs = glob(
53+
# include = [
54+
# "**/*_spec.ts",
55+
# "**/*_spec_large.ts",
56+
# ],
57+
# exclude = [
58+
# "schematic/files/**",
59+
# "blank/project-files/**",
60+
# "blank/schematic-files/**",
61+
# ],
62+
# ),
63+
# data = glob(
64+
# include = [
65+
# "**/*.json",
66+
# "collection.json",
67+
# "schematic/files/**",
68+
# "blank/project-files/**",
69+
# "blank/schematic-files/**",
70+
# ]
71+
# ),
72+
# deps = [
73+
# ":schematics",
74+
# "//packages/angular_devkit/core",
75+
# "//packages/angular_devkit/schematics",
76+
# "//packages/angular_devkit/schematics:testing",
77+
# "@rxjs",
78+
# "@rxjs//operators",
79+
# # @typings: jasmine
80+
# # @typings: node
81+
# ],
82+
# )
83+
84+
# jasmine_node_test(
85+
# name = "schematics_test",
86+
# srcs = [":schematics_test_lib"],
87+
# )

packages/schematics/schematics/blank/schema.d.ts

-18
This file was deleted.

packages/schematics/schematics/schematic/schema.d.ts

-18
This file was deleted.

0 commit comments

Comments
 (0)