Skip to content

Commit c4de4e1

Browse files
josephperrottatscott
authored andcommitted
refactor(docs-infra): build adev application using local generated assets (angular#53511)
Use local generated assets to build adev application. PR Close angular#53511
1 parent 8d58595 commit c4de4e1

File tree

122 files changed

+1071
-16273
lines changed

Some content is hidden

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

122 files changed

+1071
-16273
lines changed

.bazelignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,3 @@ integration/typings_test_ts49/node_modules
3838
integration/typings_test_ts50/node_modules
3939
integration/typings_test_ts51/node_modules
4040
integration/typings_test_ts52/node_modules
41-
42-
43-
# Temporarily ignore all of adev
44-
adev/

adev/.gitignore

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

adev/BUILD.bazel

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
load("@npm//@angular-devkit/architect-cli:index.bzl", "architect")
1+
load("//:packages.bzl", "link_packages")
22
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
3+
load("@npm//@angular-devkit/architect-cli:index.bzl", "architect")
4+
5+
package(default_visibility = ["//visibility:public"])
36

47
# All source and configuration files required to build the docs app
58
APPLICATION_FILES = [
6-
"//:angular.json",
7-
"adev/tsconfig.app.json",
8-
"adev/tsconfig.json",
9-
"adev/tsconfig.worker.json",
9+
"angular.json",
10+
"tsconfig.app.json",
11+
"tsconfig.json",
12+
"tsconfig.worker.json",
1013
] + glob(
11-
["adev/src/**/*"],
14+
["src/**/*"],
1215
exclude = [
13-
"adev/src/**/*.spec.ts",
16+
"src/**/*.spec.ts",
1417
# Temporarily exclude generated sources produced by the non-bazel
1518
# build until the whole project is built by bazel and this directory
1619
# isn't needed.
17-
"adev/src/generated/**/*",
20+
"src/generated/**/*",
1821
],
1922
)
2023

21-
APPLICATION_DEPS = [
24+
APPLICATION_DEPS = link_packages([
2225
"@npm//@angular-devkit/build-angular",
2326
"@npm//@angular/animations",
2427
"@npm//@angular/cdk",
@@ -38,7 +41,33 @@ APPLICATION_DEPS = [
3841
"@npm//ogl",
3942
"@npm//rxjs",
4043
"@npm//typescript",
41-
]
44+
"//adev/src/assets/images",
45+
"//adev/src/assets/textures",
46+
"//adev/src/assets/previews",
47+
"//adev/src/assets:tutorials",
48+
"//adev/src/assets/icons",
49+
"//adev/src/assets:api",
50+
"//adev/src/assets:content",
51+
"@npm//@typescript/vfs",
52+
"@npm//@codemirror/state",
53+
"@npm//@codemirror/view",
54+
"@npm//@codemirror/language",
55+
"@npm//@codemirror/commands",
56+
"@npm//@codemirror/search",
57+
"@npm//@codemirror/autocomplete",
58+
"@npm//@codemirror/lint",
59+
"@npm//@codemirror/lang-html",
60+
"@npm//@codemirror/lang-angular",
61+
"@npm//@codemirror/lang-css",
62+
"@npm//@codemirror/lang-sass",
63+
"@npm//@codemirror/lang-javascript",
64+
"@npm//@lezer/highlight",
65+
"@npm//@lezer/javascript",
66+
"@npm//@lezer/common",
67+
"@npm//xterm",
68+
"@npm//xterm-addon-fit",
69+
"@npm//angular-split",
70+
])
4271

4372
copy_to_bin(
4473
name = "application_files_bin",
@@ -56,9 +85,6 @@ architect(
5685
":application_files_bin",
5786
],
5887
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"],
6288
)
6389

6490
architect(
@@ -73,7 +99,4 @@ architect(
7399
data = APPLICATION_DEPS + [
74100
":application_files_bin",
75101
],
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"],
79102
)

angular.json renamed to adev/angular.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
2+
"$schema": "../node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"newProjectRoot": ".",
55
"projects": {
@@ -12,30 +12,33 @@
1212
"changeDetection": "OnPush"
1313
}
1414
},
15-
"root": "adev",
16-
"sourceRoot": "adev/src",
15+
"root": ".",
16+
"sourceRoot": "src",
1717
"prefix": "adev",
1818
"architect": {
1919
"build": {
2020
"builder": "@angular-devkit/build-angular:application",
2121
"options": {
22+
"externalDependencies": [
23+
"path"
24+
],
2225
"outputPath": "dist/angular-dev",
23-
"index": "adev/src/index.html",
24-
"browser": "adev/src/main.ts",
25-
"server": "adev/src/main.server.ts",
26+
"index": "src/index.html",
27+
"browser": "src/main.ts",
28+
"server": "src/main.server.ts",
2629
// TODO(josephperrott): enabled prerender
2730
"prerender": false,
28-
"polyfills": ["adev/src/polyfills.ts", "zone.js"],
29-
"tsConfig": "adev/tsconfig.app.json",
31+
"polyfills": ["src/polyfills.ts", "zone.js"],
32+
"tsConfig": "tsconfig.app.json",
3033
"inlineStyleLanguage": "scss",
3134
"assets": [
32-
"adev/src/favicon.ico",
33-
"adev/src/robots.txt",
34-
"adev/src/assets"
35+
"src/favicon.ico",
36+
"src/robots.txt",
37+
"src/assets"
3538
],
3639
"styles": ["@angular/docs/styles/global-styles.scss"],
3740
"scripts": [],
38-
"webWorkerTsConfig": "adev/tsconfig.worker.json",
41+
"webWorkerTsConfig": "tsconfig.worker.json",
3942
"optimization": {
4043
"fonts": {
4144
// TODO(josephperrott): enabled inline scripts

adev/prerender/checks/check-links.ts

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

adev/prerender/tutorials/README.md

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

adev/prerender/tutorials/generate-tutorials-routes.ts

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

0 commit comments

Comments
 (0)