Skip to content

Commit

Permalink
build: migrate @angular-devkit/schematics-cli to npm_package
Browse files Browse the repository at this point in the history
This allows us to use the package in the RJS pnpm workspace.

(cherry picked from commit 92c7674)
  • Loading branch information
josephperrott authored and dgp1130 committed Jan 15, 2025
1 parent 50066a3 commit 84bbfa5
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions packages/angular_devkit/schematics_cli/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm")
load("//tools:interop.bzl", "ts_project")
load("//tools:defaults2.bzl", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

# Copyright Google Inc. All Rights Reserved.
Expand All @@ -11,6 +10,19 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

RUNTIME_ASSETS = [
"blank/schema.json",
"collection.json",
"package.json",
"schematic/schema.json",
] + glob(
include = [
"blank/project-files/**/*",
"blank/schematic-files/**/*",
"schematic/files/**/*",
],
)

# @angular-devkit/schematics-cli
ts_project(
name = "schematics_cli",
Expand All @@ -29,18 +41,7 @@ ts_project(
"//packages/angular_devkit/schematics_cli:blank/schema.ts",
"//packages/angular_devkit/schematics_cli:schematic/schema.ts",
],
data = [
"blank/schema.json",
"collection.json",
"package.json",
"schematic/schema.json",
] + glob(
include = [
"blank/project-files/**/*",
"blank/schematic-files/**/*",
"schematic/files/**/*",
],
),
data = RUNTIME_ASSETS,
module_name = "@angular-devkit/schematics-cli",
deps = [
"//:root_modules/@inquirer/prompts",
Expand Down Expand Up @@ -96,16 +97,16 @@ genrule(
cmd = "cp $(execpath //:LICENSE) $@",
)

pkg_npm(
name = "npm_package",
npm_package(
name = "pkg",
pkg_deps = [
"//packages/angular_devkit/schematics:package.json",
"//packages/angular_devkit/core:package.json",
],
tags = ["release-package"],
deps = [
deps = RUNTIME_ASSETS + [
":README.md",
":license",
":schematics_cli",
":schematics_cli_rjs",
],
)

0 comments on commit 84bbfa5

Please sign in to comment.