Skip to content

Commit cebe2db

Browse files
committed
refactor(docs-infra): refactor adev to build using architect (angular#53497)
Refactor adev as needed to build using architect. PR Close angular#53497
1 parent 7c8f026 commit cebe2db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+221
-514
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ baseline.json
5757
# Husky
5858
.husky/_
5959
aio/content/examples/.DS_Store
60+
61+
62+
# Ignore cache created with the Angular CLI.
63+
.angular/

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ exports_files([
1313
"scripts/ci/payload-size.sh",
1414
"scripts/ci/payload-size.js",
1515
"package.json",
16+
"angular.json",
1617
])
1718

1819
filegroup(

adev/.gitignore

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,2 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
2-
3-
# Compiled output
4-
/dist
5-
/tmp
6-
/out-tsc
7-
/bazel-out
81
/src/assets/tutorials
92
/src/assets/previews
10-
/TEMP
11-
12-
# Node
13-
node_modules
14-
npm-debug.log
15-
yarn-error.log
16-
17-
# IDEs and editors
18-
.idea/
19-
.project
20-
.classpath
21-
.c9/
22-
*.launch
23-
.settings/
24-
*.sublime-workspace
25-
26-
# Visual Studio Code
27-
.vscode/*
28-
!.vscode/settings.json
29-
!.vscode/tasks.json
30-
!.vscode/launch.json
31-
!.vscode/extensions.json
32-
.history/*
33-
34-
# Miscellaneous
35-
/.angular/cache
36-
.sass-cache/
37-
/connect.lock
38-
/coverage
39-
/libpeerconnection.log
40-
testem.log
41-
/typings
42-
43-
# Ignore ng-dev logs and user-config
44-
.ng-dev.err*
45-
.ng-dev.log
46-
.ng-dev.user*
47-
48-
# System files
49-
.DS_Store
50-
Thumbs.db
51-
52-
53-
# Yarn v2+. Zero installs disabled since we are not using PnP.
54-
.pnp.*
55-
.yarn/*
56-
!.yarn/patches
57-
!.yarn/plugins
58-
!.yarn/releases
59-
!.yarn/sdks
60-
!.yarn/versions
61-
!.yarn/yarn.js
62-
63-
64-
# Firebase
65-
.firebase
66-
*-debug.log
67-
.runtimeconfig.json

adev/.markdownlint.jsonc

Lines changed: 0 additions & 42 deletions
This file was deleted.

adev/.markdownlintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

adev/.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

adev/.stylelintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

adev/.stylelintrc.json

Lines changed: 0 additions & 130 deletions
This file was deleted.

adev/BUILD.bazel

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
load("@npm//@angular-devkit/architect-cli:index.bzl", "architect")
2+
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
3+
4+
# All source and configuration files required to build the docs app
5+
APPLICATION_FILES = [
6+
"//:angular.json",
7+
"adev/tsconfig.app.json",
8+
"adev/tsconfig.json",
9+
"adev/tsconfig.worker.json",
10+
] + glob(
11+
["adev/src/**/*"],
12+
exclude = [
13+
"adev/src/**/*.spec.ts",
14+
# Temporarily exclude generated sources produced by the non-bazel
15+
# build until the whole project is built by bazel and this directory
16+
# isn't needed.
17+
"adev/src/generated/**/*",
18+
],
19+
)
20+
21+
APPLICATION_DEPS = [
22+
"@npm//@angular-devkit/build-angular",
23+
"@npm//@angular/animations",
24+
"@npm//@angular/cdk",
25+
"@npm//@angular/common",
26+
"@npm//@angular/compiler",
27+
"@npm//@angular/compiler-cli",
28+
"@npm//@angular/core",
29+
"@npm//@angular/docs",
30+
"@npm//@angular/forms",
31+
"@npm//@angular/material",
32+
"@npm//@angular/platform-browser",
33+
"@npm//@angular/platform-server",
34+
"@npm//@angular/router",
35+
"@npm//gsap",
36+
"@npm//marked",
37+
"@npm//ngx-progressbar",
38+
"@npm//ogl",
39+
"@npm//rxjs",
40+
"@npm//typescript",
41+
]
42+
43+
copy_to_bin(
44+
name = "application_files_bin",
45+
srcs = APPLICATION_FILES,
46+
)
47+
48+
architect(
49+
name = "build",
50+
args = [
51+
"angular-dev:build",
52+
"--output-path=build-app",
53+
],
54+
chdir = "$(RULEDIR)",
55+
data = APPLICATION_DEPS + [
56+
":application_files_bin",
57+
],
58+
output_dir = True,
59+
# When building with local packages (--config=aio_local_deps), RBE complains about
60+
# the input tree being too large (> 70,000 files).
61+
tags = ["no-remote-exec"],
62+
)
63+
64+
architect(
65+
name = "serve",
66+
args = [
67+
"angular-dev:serve",
68+
"--poll=1000",
69+
"--live-reload",
70+
"--watch",
71+
],
72+
chdir = package_name(),
73+
data = APPLICATION_DEPS + [
74+
":application_files_bin",
75+
],
76+
# When building with local packages (--config=aio_local_deps), RBE complains about
77+
# the input tree being too large (> 70,000 files).
78+
tags = ["no-remote-exec"],
79+
)

adev/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)