3
3
load ("@rules_pkg//:pkg.bzl" , "pkg_tar" )
4
4
load ("@build_bazel_rules_nodejs//:index.bzl" , _pkg_npm = "pkg_npm" )
5
5
load ("@io_bazel_rules_sass//:defs.bzl" , _npm_sass_library = "npm_sass_library" , _sass_binary = "sass_binary" , _sass_library = "sass_library" )
6
- load ("@npm//@angular/bazel:index.bzl" , _ng_module = "ng_module" , _ng_package = "ng_package" )
6
+ load ("@npm//@angular/bazel:index.bzl" , _ng_package = "ng_package" )
7
7
load ("@npm//@angular/build-tooling/bazel/integration:index.bzl" , _integration_test = "integration_test" )
8
8
load ("@npm//@angular/build-tooling/bazel/karma:index.bzl" , _karma_web_test_suite = "karma_web_test_suite" )
9
9
load ("@npm//@angular/build-tooling/bazel/esbuild:index.bzl" , _esbuild = "esbuild" , _esbuild_config = "esbuild_config" )
@@ -18,7 +18,6 @@ load("//:pkg-externals.bzl", "PKG_EXTERNALS")
18
18
load ("//tools/markdown-to-html:index.bzl" , _markdown_to_html = "markdown_to_html" )
19
19
load ("//tools/extract-tokens:index.bzl" , _extract_tokens = "extract_tokens" )
20
20
load ("//tools/angular:index.bzl" , "LINKER_PROCESSED_FW_PACKAGES" )
21
- load ("//tools/bazel:module_name.bzl" , "compute_module_name" )
22
21
23
22
_DEFAULT_TSCONFIG_BUILD = "//src:bazel-tsconfig-build.json"
24
23
_DEFAULT_TSCONFIG_TEST = "//src:tsconfig-test"
@@ -67,47 +66,6 @@ def sass_library(**kwargs):
67
66
def npm_sass_library (** kwargs ):
68
67
_npm_sass_library (** kwargs )
69
68
70
- def ng_module (
71
- deps = [],
72
- srcs = [],
73
- tsconfig = None ,
74
- testonly = False ,
75
- ** kwargs ):
76
- if not tsconfig :
77
- tsconfig = _getDefaultTsConfig (testonly )
78
-
79
- # Compute an AMD module name for the target.
80
- module_name = compute_module_name (testonly )
81
-
82
- local_deps = [
83
- # Add tslib because we use import helpers for all public packages.
84
- "@npm//tslib" ,
85
- ]
86
-
87
- # Append given deps only if they're not in the default set of deps
88
- for d in deps :
89
- if d not in local_deps :
90
- local_deps = local_deps + [d ]
91
-
92
- _ng_module (
93
- srcs = srcs ,
94
- # `module_name` is used for AMD module names within emitted JavaScript files.
95
- module_name = module_name ,
96
- # We use the module name as package name, so that the target can be resolved within
97
- # NodeJS executions, by activating the Bazel NodeJS linker.
98
- # See: https://github.com/bazelbuild/rules_nodejs/pull/2799.
99
- package_name = module_name ,
100
- strict_templates = True ,
101
- deps = local_deps ,
102
- tsconfig = tsconfig ,
103
- testonly = testonly ,
104
- ** kwargs
105
- )
106
-
107
- # TODO(devversion): Partner with ISE team to support `rules_js` here.
108
- if False and module_name and not testonly :
109
- _make_tsec_test (kwargs ["name" ])
110
-
111
69
def ng_package (name , srcs = [], deps = [], externals = PKG_EXTERNALS , readme_md = None , visibility = None , ** kwargs ):
112
70
# If no readme file has been specified explicitly, use the default readme for
113
71
# release packages from "src/README.md".
@@ -295,7 +253,7 @@ def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, *
295
253
]
296
254
297
255
# Workaround for https://github.com/bazelbuild/rules_typescript/issues/301
298
- # Since some of our tests depend on CSS files which are not part of the `ng_module ` rule,
256
+ # Since some of our tests depend on CSS files which are not part of the `ng_project ` rule,
299
257
# we need to somehow load static CSS files within Karma (e.g. overlay prebuilt). Those styles
300
258
# are required for successful test runs. Since the `karma_web_test_suite` rule currently only
301
259
# allows JS files to be included and served within Karma, we need to create a JS file that
0 commit comments