pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/angular/angular/commit/25e13e9f96f56ddc073a5a5f63dc9be96333bd41

560d244c08.css" /> build: add a dev-app · angular/angular@25e13e9 · GitHub
Skip to content

Commit 25e13e9

Browse files
authored
build: add a dev-app
Adds a dev app that can be used to prototype and debug things while developing Angular. Use `pnpm dev` to run it.
1 parent ca3ef38 commit 25e13e9

25 files changed

+764
-1
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ vscode-ng-language-service/integration/project/dist/
4545
adev/node_modules
4646
adev/shared-docs/node_modules
4747
adev/shared-docs/pipeline/api-gen/node_modules
48+
dev-app/node_modules
4849
modules/node_modules
4950
integration/node_modules
5051
packages/animations/node_modules

dev-app/BUILD.bazel

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
load("@npm//:defs.bzl", "npm_link_all_packages")
2+
load("@rules_angular//src/architect:ng_application.bzl", "ng_application")
3+
load("@rules_angular//src/architect:ng_config.bzl", "ng_config")
4+
load("@rules_angular//src/architect:ng_test.bzl", "ng_test")
5+
6+
package(default_visibility = ["//visibility:public"])
7+
8+
npm_link_all_packages(
9+
name = "node_modules",
10+
)
11+
12+
APPLICATION_FILES = [
13+
"//dev-app/public",
14+
] + glob(
15+
["src/**/*"],
16+
exclude = ["src/**/*.spec.ts"],
17+
)
18+
19+
APPLICATION_DEPS = [
20+
":node_modules/typescript",
21+
]
22+
23+
TEST_FILES = APPLICATION_FILES + glob(["src/app/**/*.spec.ts"])
24+
25+
TEST_DEPS = APPLICATION_DEPS + [
26+
":node_modules/jsdom",
27+
":node_modules/vitest",
28+
":tsconfig.app.json",
29+
]
30+
31+
ng_config(name = "ng_config")
32+
33+
ng_application(
34+
name = "build",
35+
srcs = APPLICATION_FILES + APPLICATION_DEPS,
36+
args = [
37+
"--configuration",
38+
"development",
39+
],
40+
env = {
41+
"NG_BUILD_PARTIAL_SSR": "1",
42+
},
43+
ng_config = ":ng_config",
44+
node_modules = ":node_modules",
45+
project_name = "dev-app",
46+
tags = [
47+
# Tagged as manual as both build and build.production use the same output directory.
48+
"manual",
49+
],
50+
)
51+
52+
ng_application(
53+
name = "build.production",
54+
srcs = APPLICATION_FILES + APPLICATION_DEPS,
55+
args = [
56+
"--configuration",
57+
"production",
58+
],
59+
env = {
60+
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
61+
},
62+
ng_config = ":ng_config",
63+
node_modules = ":node_modules",
64+
project_name = "dev-app",
65+
tags = [
66+
# Tagged as manual as both build and build.production use the same output directory.
67+
"manual",
68+
],
69+
)
70+
71+
ng_test(
72+
name = "test",
73+
srcs = TEST_FILES + TEST_DEPS,
74+
ng_config = ":ng_config",
75+
node_modules = ":node_modules",
76+
project_name = "dev-app",
77+
)

dev-app/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Angular dev-app
2+
3+
For experimentation while developing Angular.
4+
5+
## Local Development
6+
7+
For local development, [pnpm](https://pnpm.io/) is the preferred package manager. You can set up a local environment with the following commands:
8+
9+
```bash
10+
# Clone Angular repo
11+
git clone https://github.com/angular/angular.git
12+
13+
# Navigate to project directory
14+
cd angular
15+
16+
# Install dependencies
17+
pnpm install
18+
19+
# Build and run local dev server
20+
# NOTE: Initial build will take some time
21+
pnpm dev
22+
```
23+
24+
## FAQs
25+
26+
### The build is failing and I'm seeing `bazel:bazel failed: missing input file` messages.
27+
28+
This is most likely due to a bazel dependency / caching issue. To resolve this, run the following command:
29+
30+
```
31+
# Try this first
32+
pnpm bazel clean
33+
34+
# If that doesn't work, try it with the expunge flag
35+
pnpm bazel clean --expunge
36+
```

dev-app/angular.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"cli": {
5+
"packageManager": "pnpm",
6+
"analytics": "dca119a9-da31-47f7-a6cb-b60541037021"
7+
},
8+
"newProjectRoot": "projects",
9+
"projects": {
10+
"dev-app": {
11+
"projectType": "application",
12+
"schematics": {},
13+
"root": "",
14+
"sourceRoot": "src",
15+
"prefix": "app",
16+
"architect": {
17+
"build": {
18+
"builder": "@angular/build:application",
19+
"options": {
20+
"externalDependencies": ["xhr2"],
21+
"browser": "src/main.ts",
22+
"tsConfig": "tsconfig.app.json",
23+
"assets": [
24+
{
25+
"glob": "**/*",
26+
"input": "public"
27+
}
28+
],
29+
"styles": ["src/styles.css"],
30+
"server": "src/main.server.ts",
31+
"outputMode": "static"
32+
},
33+
"configurations": {
34+
"production": {
35+
"outputHashing": "all"
36+
},
37+
"development": {
38+
"optimization": false,
39+
"extractLicenses": false,
40+
"sourceMap": true
41+
}
42+
},
43+
"defaultConfiguration": "production"
44+
},
45+
"serve": {
46+
"builder": "@angular/build:dev-server",
47+
"configurations": {
48+
"production": {
49+
"buildTarget": "dev-app:build:production"
50+
},
51+
"development": {
52+
"buildTarget": "dev-app:build:development"
53+
}
54+
},
55+
"defaultConfiguration": "development"
56+
},
57+
"test": {
58+
"builder": "@angular/build:unit-test"
59+
}
60+
}
61+
}
62+
}
63+
}

dev-app/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "dev-app",
3+
"private": true,
4+
"scripts": {
5+
"dev": "ibazel run //dev-app:build.serve",
6+
"dev:build": "bazel build //dev-app:build"
7+
},
8+
"dependencies": {
9+
"@angular/common": "workspace:*",
10+
"@angular/compiler": "workspace:*",
11+
"@angular/core": "workspace:*",
12+
"@angular/forms": "workspace:*",
13+
"@angular/platform-browser": "workspace:*",
14+
"@angular/platform-server": "workspace:*",
15+
"@angular/router": "workspace:*",
16+
"@angular/ssr": "21.0.0-rc.0",
17+
"rxjs": "~7.8.0",
18+
"tslib": "^2.3.0"
19+
},
20+
"devDependencies": {
21+
"@angular/build": "21.0.0-rc.0",
22+
"@angular/cli": "21.0.0-rc.0",
23+
"@angular/compiler-cli": "workspace:*",
24+
"@types/jasmine": "5.1.12",
25+
"@types/node": "^20.17.19",
26+
"jasmine-core": "5.12.0",
27+
"jsdom": "^27.0.0",
28+
"karma": "~6.4.4",
29+
"karma-chrome-launcher": "3.2.0",
30+
"karma-coverage": "2.2.1",
31+
"karma-jasmine": "5.1.0",
32+
"karma-jasmine-html-reporter": "2.1.0",
33+
"typescript": "~5.9.2",
34+
"vitest": "^4.0.0",
35+
"zone.js": "0.15.1"
36+
}
37+
}

dev-app/public/BUILD.bazel

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
2+
3+
exports_files(
4+
glob(["*"]),
5+
)
6+
7+
copy_to_bin(
8+
name = "public",
9+
srcs = glob(["*"]),
10+
visibility = [
11+
"//visibility:public",
12+
],
13+
)

dev-app/public/favicon.ico

14.7 KB
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {mergeApplicationConfig, ApplicationConfig} from '@angular/core';
2+
import {provideServerRendering, withRoutes} from '@angular/ssr';
3+
import {appConfig} from './app.config';
4+
import {serverRoutes} from './app.routes.server';
5+
6+
const serverConfig: ApplicationConfig = {
7+
providers: [provideServerRendering(withRoutes(serverRoutes))],
8+
};
9+
10+
export const config = mergeApplicationConfig(appConfig, serverConfig);

dev-app/src/app/app.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {ApplicationConfig, provideBrowserGlobalErrorListeners} from '@angular/core';
2+
import {provideRouter} from '@angular/router';
3+
4+
import {routes} from './app.routes';
5+
import {provideClientHydration, withEventReplay} from '@angular/platform-browser';
6+
import {provideHttpClient, withFetch} from '@angular/common/http';
7+
8+
export const appConfig: ApplicationConfig = {
9+
providers: [
10+
provideBrowserGlobalErrorListeners(),
11+
provideRouter(routes),
12+
provideHttpClient(withFetch()),
13+
provideClientHydration(withEventReplay()),
14+
],
15+
};

dev-app/src/app/app.css

Whitespace-only changes.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy