Alan Agius 588823b437 refactor(elements): ng-add schematics (#33723)
This PR brings a couple of changes;
- Removes undeed dependencies in bazel targets such as `//packages/common` & `//packages/core`
- Removes RxJs usage
- Adds `document-register-element` to architect test targets
- Use @schematics/angular helpers
- Uses the standard `$source": "projectName"` to get the projectName, which is defined in the `schema.json`
- Use workspace writer to update the workspace config

PR Close #33723
2019-11-22 17:36:47 -05:00

41 lines
739 B
Python

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "ng-add",
srcs =
[
"index.ts",
"schema.ts",
],
deps = [
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
],
)
ts_library(
name = "test_lib",
testonly = True,
srcs = [
"index_spec.ts",
],
data = [
"schema.json",
],
deps = [
":ng-add",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
],
)
jasmine_node_test(
name = "test",
deps = [
":test_lib",
"//packages/elements/schematics:collection",
],
)