# 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 load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") load("//tools:defaults.bzl", "ts_library") load("//tools:ts_json_schema.bzl", "ts_json_schema") # @external_begin load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm") # @external_end licenses(["notice"]) # MIT package(default_visibility = ["//visibility:public"]) ts_json_schema( name = "schema", src = "src/build/schema.json", ) ts_library( name = "build_ng_packagr", srcs = glob( include = ["src/**/*.ts"], exclude = ["src/**/*_spec.ts"], ) + [ "//packages/angular_devkit/build_ng_packagr:src/build/schema.ts", ], data = [ "builders.json", "package.json", "src/build/schema.json", ], module_name = "@angular-devkit/build-ng-packagr", module_root = "src/index.d.ts", deps = [ "//packages/angular_devkit/architect", "@npm//@types/node", "@npm//ng-packagr", "@npm//rxjs", ], ) # @external_begin pkg_npm( name = "npm_package", deps = [ ":build_ng_packagr", ], ) pkg_tar( name = "npm_package_archive", srcs = [":npm_package"], extension = "tar.gz", strip_prefix = "./npm_package", tags = ["manual"], ) # @external_end ts_library( name = "build_ng_packagr_test_lib", testonly = True, srcs = glob( include = [ "src/test-utils.ts", "src/**/*_spec.ts", ], ), data = glob(["test/**/*"]), deps = [ ":build_ng_packagr", "//packages/angular_devkit/architect", "//packages/angular_devkit/architect/node", "//packages/angular_devkit/architect/testing", "//packages/angular_devkit/core", "@npm//@angular/common", "@npm//@angular/compiler", "@npm//@angular/compiler-cli", "@npm//@angular/core", "@npm//@angular/platform-browser", "@npm//@angular/platform-browser-dynamic", "@npm//@angular/router", "@npm//ng-packagr", "@npm//rxjs", "@npm//tslib", "@npm//typescript", "@npm//zone.js", ], ) jasmine_node_test( name = "build_ng_packagr_test", srcs = ["build_ng_packagr_test_lib"], tags = ["cpu:2"], templated_args = ["--nobazel_patch_module_resolver"], ) jasmine_node_test( name = "build_ng_packagr_ve_test", srcs = ["build_ng_packagr_test_lib"], tags = ["cpu:2"], templated_args = [ "--nobazel_patch_module_resolver", "view_engine", ], )