Revert "build: update integration/bazel & @angular/bazel schematics to rules_nodejs 1.0.0 (#34589)" (#34730)
This reverts commit 7203169c3d
.
PR Close #34730
This commit is contained in:
@ -15,8 +15,8 @@ workspace(
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
RULES_NODEJS_VERSION = "1.0.0"
|
||||
RULES_NODEJS_SHA256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc50ec1d9b0a6cabd2b"
|
||||
RULES_NODEJS_VERSION = "0.40.0"
|
||||
RULES_NODEJS_SHA256 = "9901bc17138a79135048fb0c107ee7a56e91815ec6594c08cb9a17b80276d62b"
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
sha256 = RULES_NODEJS_SHA256,
|
||||
@ -24,16 +24,13 @@ http_archive(
|
||||
)
|
||||
|
||||
# Rules for compiling sass
|
||||
RULES_SASS_VERSION = "1.24.0"
|
||||
RULES_SASS_SHA256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f"
|
||||
RULES_SASS_VERSION = "86ca977cf2a8ed481859f83a286e164d07335116"
|
||||
RULES_SASS_SHA256 = "4f05239080175a3f4efa8982d2b7775892d656bb47e8cf56914d5f9441fb5ea6"
|
||||
http_archive(
|
||||
name = "io_bazel_rules_sass",
|
||||
sha256 = RULES_SASS_SHA256,
|
||||
url = "https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
|
||||
strip_prefix = "rules_sass-%s" % RULES_SASS_VERSION,
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/%s.zip" % RULES_SASS_VERSION,
|
||||
],
|
||||
)
|
||||
|
||||
####################################
|
||||
|
@ -1,10 +1,9 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_web")
|
||||
load("@npm//history-server:index.bzl", "history_server")
|
||||
load("@npm//html-insert-assets:index.bzl", "html_insert_assets")
|
||||
load("@npm_angular_bazel//:index.bzl", "ng_module")
|
||||
load("@npm_bazel_karma//:index.bzl", "karma_web_test_suite")
|
||||
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
|
||||
load("@npm//history-server:index.bzl", "history_server")
|
||||
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
|
||||
load("@npm_bazel_terser//:index.bzl", "terser_minified")
|
||||
load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library")
|
||||
@ -65,38 +64,18 @@ terser_minified(
|
||||
src = ":bundle",
|
||||
)
|
||||
|
||||
html_insert_assets(
|
||||
name = "inject_scripts",
|
||||
outs = ["_/index.html"],
|
||||
args = [
|
||||
"--html",
|
||||
"$(location :index.html)",
|
||||
"--out",
|
||||
"$@",
|
||||
"--roots",
|
||||
"$(RULEDIR)",
|
||||
"--assets",
|
||||
"$(location :global_stylesheet.css)",
|
||||
"$(location @npm//:node_modules/zone.js/dist/zone.min.js)",
|
||||
"bundle.min.js",
|
||||
],
|
||||
data = [
|
||||
":index.html",
|
||||
":global_stylesheet.css",
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
],
|
||||
)
|
||||
|
||||
pkg_web(
|
||||
web_package(
|
||||
name = "prodapp",
|
||||
additional_root_paths = ["src/_"],
|
||||
srcs = [
|
||||
assets = [
|
||||
# do not sort
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
":bundle.min",
|
||||
":global_stylesheet",
|
||||
":inject_scripts",
|
||||
],
|
||||
data = [
|
||||
"favicon.ico",
|
||||
],
|
||||
index_html = "index.html",
|
||||
)
|
||||
|
||||
history_server(
|
||||
@ -116,7 +95,6 @@ filegroup(
|
||||
|
||||
ts_devserver(
|
||||
name = "devserver",
|
||||
additional_root_paths = ["src/_"],
|
||||
port = 4200,
|
||||
entry_module = "project/src/main.dev",
|
||||
serving_path = "/bundle.min.js",
|
||||
@ -127,9 +105,11 @@ ts_devserver(
|
||||
static_files = [
|
||||
"@npm//:node_modules/zone.js/dist/zone.min.js",
|
||||
":global_stylesheet",
|
||||
":inject_scripts",
|
||||
],
|
||||
data = [
|
||||
"favicon.ico",
|
||||
],
|
||||
index_html = "index.html",
|
||||
deps = [":src"],
|
||||
)
|
||||
|
||||
@ -178,5 +158,6 @@ karma_web_test_suite(
|
||||
deps = [
|
||||
":rxjs_umd_modules",
|
||||
":test_lib",
|
||||
"@npm//karma-jasmine",
|
||||
],
|
||||
)
|
||||
|
@ -39,26 +39,17 @@ function addDevDependenciesToPackageJson(options: Schema) {
|
||||
const devDependencies: [string, string][] = [
|
||||
['@angular/bazel', angularCore.version],
|
||||
['@bazel/bazel', '1.1.0'],
|
||||
['@bazel/ibazel', '0.10.3'],
|
||||
['@bazel/karma', '1.0.0'],
|
||||
['@bazel/protractor', '1.0.0'],
|
||||
['@bazel/rollup', '1.0.0'],
|
||||
['@bazel/terser', '1.0.0'],
|
||||
['@bazel/typescript', '1.0.0'],
|
||||
['history-server', '1.3.1'],
|
||||
['html-insert-assets', '0.2.0'],
|
||||
['karma', '4.4.1'],
|
||||
['karma-chrome-launcher', '3.1.0'],
|
||||
['karma-firefox-launcher', '1.2.0'],
|
||||
['karma-jasmine', '2.0.1'],
|
||||
['karma-requirejs', '1.1.0'],
|
||||
['karma-sourcemap-loader', '0.3.7'],
|
||||
['protractor', '5.4.2'],
|
||||
['requirejs', '2.3.6'],
|
||||
['rollup', '1.27.5'],
|
||||
['rollup-plugin-commonjs', '10.1.0'],
|
||||
['rollup-plugin-node-resolve', '5.2.0'],
|
||||
['terser', '4.4.0'],
|
||||
['@bazel/ibazel', '^0.10.2'],
|
||||
['@bazel/karma', '0.40.0'],
|
||||
['@bazel/protractor', '0.40.0'],
|
||||
['@bazel/rollup', '0.40.0'],
|
||||
['@bazel/terser', '0.40.0'],
|
||||
['@bazel/typescript', '0.40.0'],
|
||||
['history-server', '^1.3.1'],
|
||||
['rollup', '^1.25.2'],
|
||||
['rollup-plugin-commonjs', '^10.1.0'],
|
||||
['rollup-plugin-node-resolve', '^5.2.0'],
|
||||
['terser', '^4.3.9'],
|
||||
];
|
||||
|
||||
for (const [name, version] of devDependencies) {
|
||||
|
Reference in New Issue
Block a user