From 0a8c13d8f8015c0d38f8c31f616e10cbedb133b8 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Mon, 29 Nov 2021 16:57:33 -0800 Subject: [PATCH] build: add pkg_npm rules for remaining packages (cherry picked from commit 83b7390c680515d754ff72e90017c3c8dd828f98) --- packages/angular/pwa/BUILD.bazel | 17 +++++++++++++++++ .../angular_devkit/architect_cli/BUILD.bazel | 17 +++++++++++++++++ .../angular_devkit/schematics_cli/BUILD.bazel | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/packages/angular/pwa/BUILD.bazel b/packages/angular/pwa/BUILD.bazel index 5b7a218b5c96..af8b44ce7f58 100644 --- a/packages/angular/pwa/BUILD.bazel +++ b/packages/angular/pwa/BUILD.bazel @@ -6,6 +6,8 @@ load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") load("//tools:defaults.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") +load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm") licenses(["notice"]) # MIT @@ -67,3 +69,18 @@ jasmine_node_test( name = "pwa_test", srcs = [":pwa_test_lib"], ) + +pkg_npm( + name = "npm_package", + deps = [ + ":pwa", + ], +) + +pkg_tar( + name = "npm_package_archive", + srcs = [":npm_package"], + extension = "tar.gz", + strip_prefix = "./npm_package", + tags = ["manual"], +) diff --git a/packages/angular_devkit/architect_cli/BUILD.bazel b/packages/angular_devkit/architect_cli/BUILD.bazel index 2381827d2753..3f846ec99627 100644 --- a/packages/angular_devkit/architect_cli/BUILD.bazel +++ b/packages/angular_devkit/architect_cli/BUILD.bazel @@ -1,4 +1,6 @@ load("//tools:defaults.bzl", "ts_library") +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") +load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm") # Copyright Google Inc. All Rights Reserved. # @@ -27,3 +29,18 @@ ts_library( "@npm//rxjs", ], ) + +pkg_npm( + name = "npm_package", + deps = [ + ":architect_cli", + ], +) + +pkg_tar( + name = "npm_package_archive", + srcs = [":npm_package"], + extension = "tar.gz", + strip_prefix = "./npm_package", + tags = ["manual"], +) diff --git a/packages/angular_devkit/schematics_cli/BUILD.bazel b/packages/angular_devkit/schematics_cli/BUILD.bazel index 1d2ccc908b91..43cc1cba03bc 100644 --- a/packages/angular_devkit/schematics_cli/BUILD.bazel +++ b/packages/angular_devkit/schematics_cli/BUILD.bazel @@ -1,6 +1,8 @@ load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") load("//tools:defaults.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") +load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm") # Copyright Google Inc. All Rights Reserved. # @@ -88,3 +90,18 @@ ts_json_schema( name = "schematic_schema", src = "schematic/schema.json", ) + +pkg_npm( + name = "npm_package", + deps = [ + ":schematics_cli", + ], +) + +pkg_tar( + name = "npm_package_archive", + srcs = [":npm_package"], + extension = "tar.gz", + strip_prefix = "./npm_package", + tags = ["manual"], +)