Skip to content

Commit

Permalink
build: remove deps on legacy nodejs rules rollup_bundle internals
Browse files Browse the repository at this point in the history
The legacy nodejs rules rollup_bundle is now deprecated and will be removed in the nodejs rules 1.0 release due in mid-November. This PR brings in the rules_nodejs internal API deps that ng_rollup_bundle, ng_package and ls_rollup_bundle depend on into this repo to break the dependency. In the future these rules should switch to use the new rollup_bundle via a macro as done in #33329 but this is not possible right now due to the complication of having esm5 re-rooted ts_library dependencies.
  • Loading branch information
gregmagolan committed Oct 25, 2019
1 parent dcdb433 commit 38c6d4a
Show file tree
Hide file tree
Showing 17 changed files with 1,916 additions and 364 deletions.
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -40,10 +40,13 @@
"@angular-devkit/core": "^9.0.0-next.15",
"@angular-devkit/schematics": "^9.0.0-next.15",
"@angular/bazel": "file:./tools/npm/@angular_bazel",
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@bazel/jasmine": "0.38.3",
"@bazel/karma": "0.38.3",
"@bazel/protractor": "0.38.3",
"@bazel/terser": "0.38.3",
"@bazel/typescript": "0.38.3",
"@microsoft/api-extractor": "^7.3.9",
"@schematics/angular": "^8.0.0-beta.15",
Expand Down
1 change: 0 additions & 1 deletion packages/bazel/docs/BUILD.bazel
Expand Up @@ -4,7 +4,6 @@ skylark_doc(
name = "docs",
srcs = [
"//packages/bazel/src:ng_module.bzl",
"//packages/bazel/src:ng_rollup_bundle.bzl",
"//packages/bazel/src/ng_package:ng_package.bzl",
],
format = "html",
Expand Down
17 changes: 0 additions & 17 deletions packages/bazel/src/BUILD.bazel
Expand Up @@ -10,23 +10,6 @@ exports_files(glob(["*.bzl"]))

load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")

nodejs_binary(
name = "rollup_with_build_optimizer",
data = [
"@npm//@angular-devkit/build-optimizer",
"@npm//is-builtin-module",
"@npm//rollup",
"@npm//rollup-plugin-amd",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-json",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
],
entry_point = "@npm//:node_modules/rollup/bin/rollup",
install_source_map_support = False,
visibility = ["//visibility:public"],
)

filegroup(
name = "empty_node_modules",
srcs = [],
Expand Down
12 changes: 10 additions & 2 deletions packages/bazel/src/ng_package/BUILD.bazel
Expand Up @@ -27,9 +27,17 @@ nodejs_binary(
install_source_map_support = False,
)

exports_files(["ng_package.bzl"])
exports_files([
"ng_package.bzl",
"rollup.config.js",
"terser_config.default.json",
])

filegroup(
name = "package_assets",
srcs = glob(["*.bzl"]) + ["BUILD.bazel"],
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
"rollup.config.js",
"terser_config.default.json",
],
)

0 comments on commit 38c6d4a

Please sign in to comment.