mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Force adev and devapp to run in non-TTY mode so it doesn't create a prompt that can't be interacted with. This will initially have no effect, but the fix is expected to land in CLI to make this work as expected in the next few days.
79 lines
1.8 KiB
Text
79 lines
1.8 KiB
Text
load("@npm//:defs.bzl", "npm_link_all_packages")
|
|
load("@rules_angular//src/architect:ng_application.bzl", "ng_application")
|
|
load("@rules_angular//src/architect:ng_config.bzl", "ng_config")
|
|
load("@rules_angular//src/architect:ng_test.bzl", "ng_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
npm_link_all_packages(
|
|
name = "node_modules",
|
|
)
|
|
|
|
APPLICATION_FILES = [
|
|
"//dev-app/public",
|
|
] + glob(
|
|
["src/**/*"],
|
|
exclude = ["src/**/*.spec.ts"],
|
|
)
|
|
|
|
APPLICATION_DEPS = [
|
|
":node_modules/typescript",
|
|
]
|
|
|
|
TEST_FILES = APPLICATION_FILES + glob(["src/app/**/*.spec.ts"])
|
|
|
|
TEST_DEPS = APPLICATION_DEPS + [
|
|
":node_modules/jsdom",
|
|
":node_modules/vitest",
|
|
":tsconfig.app.json",
|
|
]
|
|
|
|
ng_config(name = "ng_config")
|
|
|
|
ng_application(
|
|
name = "build",
|
|
srcs = APPLICATION_FILES + APPLICATION_DEPS,
|
|
args = [
|
|
"--configuration",
|
|
"development",
|
|
],
|
|
env = {
|
|
"NG_BUILD_PARTIAL_SSR": "1",
|
|
"NG_FORCE_TTY": "0",
|
|
},
|
|
ng_config = ":ng_config",
|
|
node_modules = ":node_modules",
|
|
project_name = "dev-app",
|
|
tags = [
|
|
# Tagged as manual as both build and build.production use the same output directory.
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
ng_application(
|
|
name = "build.production",
|
|
srcs = APPLICATION_FILES + APPLICATION_DEPS,
|
|
args = [
|
|
"--configuration",
|
|
"production",
|
|
],
|
|
env = {
|
|
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
|
|
"NG_FORCE_TTY": "0",
|
|
},
|
|
ng_config = ":ng_config",
|
|
node_modules = ":node_modules",
|
|
project_name = "dev-app",
|
|
tags = [
|
|
# Tagged as manual as both build and build.production use the same output directory.
|
|
"manual",
|
|
],
|
|
)
|
|
|
|
ng_test(
|
|
name = "test",
|
|
srcs = TEST_FILES + TEST_DEPS,
|
|
ng_config = ":ng_config",
|
|
node_modules = ":node_modules",
|
|
project_name = "dev-app",
|
|
)
|