Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ github-actions/pull-request-labeling/package.json=-197755049
github-actions/saucelabs/package.json=855472374
github-actions/unified-status-check/package.json=-337882335
ng-dev/package.json=1323489217
package.json=-1202209611
pnpm-lock.yaml=-1602715196
package.json=-791801366
pnpm-lock.yaml=-1788436055
pnpm-workspace.yaml=1110472849
yarn.lock=-598328143
14 changes: 7 additions & 7 deletions .github/local-actions/branch-manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ ts_project(
"//.github/local-actions/branch-manager:node_modules/@types/node",
"//.github/local-actions/branch-manager:node_modules/typed-graphqlify",
"//.github/local-actions/branch-manager:node_modules/undici",
"//github-actions:utils_rjs",
"//ng-dev/pr/common:common_rjs",
"//ng-dev/pr/common/labels:labels_rjs",
"//ng-dev/pr/config:config_rjs",
"//ng-dev/pr/merge:merge_rjs",
"//ng-dev/utils:utils_rjs",
"//github-actions:utils",
"//ng-dev/pr/common",
"//ng-dev/pr/common/labels",
"//ng-dev/pr/config",
"//ng-dev/pr/merge",
"//ng-dev/utils",
],
)

esbuild_checked_in(
name = "main",
srcs = [
":lib_rjs",
":lib",
],
entry_point = "lib/main.ts",
format = "esm",
Expand Down
6 changes: 3 additions & 3 deletions .github/local-actions/labels-sync/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ ts_project(
"//.github/local-actions/labels-sync:node_modules/@octokit/types",
"//.github/local-actions/labels-sync:node_modules/@types/node",
"//.github/local-actions/labels-sync:node_modules/undici",
"//github-actions:utils_rjs",
"//ng-dev/pr/common/labels:labels_rjs",
"//github-actions:utils",
"//ng-dev/pr/common/labels",
],
)

esbuild_checked_in(
name = "main",
srcs = [
":lib_rjs",
":lib",
],
entry_point = "lib/main.ts",
format = "esm",
Expand Down
4 changes: 2 additions & 2 deletions .github/local-actions/lock-closed/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ ts_project(
"//.github/local-actions/lock-closed:node_modules/@octokit/rest",
"//.github/local-actions/lock-closed:node_modules/@types/node",
"//.github/local-actions/lock-closed:node_modules/undici",
"//github-actions:utils_rjs",
"//github-actions:utils",
],
)

esbuild_checked_in(
name = "main",
srcs = [
":lib_rjs",
":lib",
],
entry_point = "lib/main.ts",
format = "esm",
Expand Down
51 changes: 5 additions & 46 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "pkg_npm")
load("@devinfra_npm//:defs.bzl", "npm_link_all_packages")
load("@npm//@bazel/typescript:index.bzl", "ts_config")

# BEGIN-INTERNAL
load("//:package.bzl", "NPM_PACKAGE_SUBSTITUTIONS")
load("//tools:defaults2.bzl", "js_binary", "ts_config")

npm_link_all_packages()

rules_js_tsconfig(
name = "rjs-tsconfig",
ts_config(
name = "tsconfig",
src = "tsconfig.json",
visibility = ["//visibility:public"],
)
Expand All @@ -19,52 +14,16 @@ exports_files([
".yarnrc.yml",
])

ts_config(
name = "tsconfig",
src = "tsconfig.json",
visibility = ["//visibility:public"],
)

nodejs_binary(
js_binary(
name = "yarn_berry_vendored",
data = [".yarn/releases/yarn-4.9.1.cjs"],
entry_point = ".yarn/releases/yarn-4.9.1.cjs",
visibility = ["//bazel/integration/tests:__subpackages__"],
)

nodejs_binary(
js_binary(
name = "yarn_classic_vendored",
data = [".yarn/releases/yarn-1.22.17.cjs"],
entry_point = ".yarn/releases/yarn-1.22.17.cjs",
visibility = ["//bazel/integration/tests:__subpackages__"],
)

package_group(
name = "npm",
packages = [
"//",
],
)

pkg_npm(
name = "npm_package",
package_name = "@angular/build-tooling",
srcs = [
"BUILD.bazel",
"package.json",
"tsconfig.json",
":index.bzl",
"//bazel:static_files",
"//lint-rules/stylelint:static_files",
"//lint-rules/tslint:static_files",
"//shared-scripts:static_files",
],
substitutions = NPM_PACKAGE_SUBSTITUTIONS,
deps = [
"//lint-rules/stylelint:lib",
"//lint-rules/tslint:lib",
],
)
# END-INTERNAL

exports_files(["tsconfig.json"])
10 changes: 10 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,13 @@ rules_angular_step3(
angular_compiler_cli = "@devinfra//:node_modules/@angular/compiler-cli",
typescript = "@devinfra//:node_modules/typescript",
)

git_repository(
name = "rules_sass",
commit = "cc1e845339fc45d3c8390445014d5824b85a0948",
remote = "https://github.com/devversion/rules_sass.git",
)

load("@rules_sass//src/toolchain:repositories.bzl", "setup_rules_sass")

setup_rules_sass()
26 changes: 16 additions & 10 deletions apps/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "nodejs_binary")
load("@devinfra_npm//:firebase-tools/package_json.bzl", firebase = "bin")
load("//tools:defaults2.bzl", "copy_to_bin", "ts_config")

ts_config(
name = "tsconfig",
src = "tsconfig.json",
visibility = [
"//apps:__subpackages__",
],
)

copy_to_bin(
name = "static_runfiles",
Expand All @@ -10,47 +19,44 @@ copy_to_bin(
],
)

nodejs_binary(
firebase.firebase_binary(
name = "serve",
chdir = package_name(),
data = [
# top-level static runfiles
":static_runfiles",

# Firebase function files
"//apps/functions:functions_compiled",
"//apps/functions:functions_files",

# Firebase hosted application files
"//apps/code-of-conduct:application_files",
],
entry_point = "@npm//:node_modules/firebase-tools/lib/bin/firebase.js",
tags = ["ibazel_notify_changes"],
templated_args = [
fixed_args = [
"--project",
"internal-200822",
"--config",
"firebase.json",
"emulators:start",
],
tags = ["ibazel_notify_changes"],
)

nodejs_binary(
firebase.firebase_binary(
name = "deploy",
chdir = package_name(),
data = [
# top-level static runfiles
":static_runfiles",

# Firebase function files
"//apps/functions:functions_compiled",
"//apps/functions:functions_files",

# Firebase hosted application files
"//apps/code-of-conduct:application_files",
"//:node_modules/firebase-functions",
],
entry_point = "@npm//:node_modules/firebase-tools/lib/bin/firebase.js",
templated_args = [
fixed_args = [
"--project",
"internal-200822",
"--config",
Expand Down
58 changes: 19 additions & 39 deletions apps/code-of-conduct/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,79 +1,59 @@
load("//tools:defaults.bzl", "esbuild", "esbuild_config", "ng_module")
load("@io_bazel_rules_sass//:defs.bzl", "npm_sass_library", "sass_binary")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
load("//tools:defaults2.bzl", "copy_to_bin", "esbuild", "ng_project", "npm_sass_library", "sass_binary")

package(default_visibility = ["//apps/code-of-conduct:__subpackages__"])

ng_module(
ng_project(
name = "main",
srcs = [
"environment.ts",
"main.ts",
],
deps = [
"//:node_modules/@angular/common",
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/fire",
"//:node_modules/@angular/platform-browser",
"//:node_modules/@angular/router",
"//:node_modules/zone.js",
"//apps/code-of-conduct/app",
"//apps/code-of-conduct/app:app_routes",
"@npm//@angular/common",
"@npm//@angular/compiler",
"@npm//@angular/fire",
"@npm//@angular/platform-browser",
"@npm//@angular/router",
"@npm//zone.js",
],
)

npm_sass_library(
name = "angular_material_sass_deps",
deps = ["@npm//@angular/material"],
deps = [
"//:node_modules/@angular/cdk",
"//:node_modules/@angular/material",
],
)

sass_binary(
name = "styles",
src = "styles.scss",
include_paths = [
"external/npm/node_modules",
],
deps = [
":angular_material_sass_deps",
],
)

esbuild_config(
name = "esbuild_config",
config_file = "esbuild.config.mjs",
deps = [
"//shared-scripts/angular-optimization:js_lib",
"@npm//@angular/compiler-cli",
],
)

esbuild(
name = "bundles",
config = ":esbuild_config",
entry_points = [":main.ts"],
platform = "browser",
target = "es2016",
deps = [
name = "bundle",
srcs = [
":main",
],
entry_points = [":main.js"],
platform = "browser",
target = "es2022",
)

copy_to_bin(
name = "application_files_in_bin",
name = "application_files",
srcs = [
"favicon.ico",
"index.html",
"robots.txt",
],
)

filegroup(
name = "application_files",
srcs = [
":application_files_in_bin",
":bundles",
":bundle",
":styles",
"@npm//:node_modules/zone.js/bundles/zone.umd.min.js",
],
visibility = ["//apps:__pkg__"],
)
27 changes: 13 additions & 14 deletions apps/code-of-conduct/app/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")
load("//tools:defaults2.bzl", "ng_project", "sass_binary")

package(default_visibility = ["//apps/code-of-conduct:__subpackages__"])

ng_module(
ng_project(
name = "app",
srcs = [
"app.component.ts",
Expand All @@ -13,12 +12,12 @@ ng_module(
"app.component.html",
],
deps = [
"//:node_modules/@angular/common",
"//:node_modules/@angular/core",
"//:node_modules/@angular/router",
"//apps/code-of-conduct/app/account",
"//apps/code-of-conduct/app/block-user",
"//apps/code-of-conduct/app/user-table",
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@angular/router",
],
)

Expand All @@ -27,29 +26,29 @@ sass_binary(
src = "app.component.scss",
)

ng_module(
ng_project(
name = "block_service",
srcs = [
"block.service.ts",
],
deps = [
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@angular/fire",
"@npm//@angular/material",
"@npm//rxjs",
"//:node_modules/@angular/common",
"//:node_modules/@angular/core",
"//:node_modules/@angular/fire",
"//:node_modules/@angular/material",
"//:node_modules/rxjs",
],
)

ng_module(
ng_project(
name = "app_routes",
srcs = [
"app.routes.ts",
],
deps = [
"//:node_modules/@angular/router",
"//apps/code-of-conduct/app/account",
"//apps/code-of-conduct/app/login",
"//apps/code-of-conduct/app/main",
"@npm//@angular/router",
],
)
Loading