Skip to content

Commit 6ddde81

Browse files
committed
feat(docs): setup application infra
1 parent c3ca025 commit 6ddde81

16 files changed

+171
-1
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.words": ["adoc"]
3+
}

docs/project.json

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"name": "docs",
3+
"$schema": "../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"generators": {
6+
"@schematics/angular:component": {
7+
"style": "scss"
8+
}
9+
},
10+
"sourceRoot": "docs/src",
11+
"prefix": "adoc",
12+
"targets": {
13+
"build": {
14+
"executor": "@angular-devkit/build-angular:application",
15+
"options": {
16+
"outputPath": "dist/docs",
17+
"index": "docs/src/index.html",
18+
"browser": "docs/src/main.ts",
19+
"polyfills": ["zone.js"],
20+
"tsConfig": "docs/tsconfig.app.json",
21+
"inlineStyleLanguage": "scss",
22+
"assets": ["docs/src/favicon.ico", "docs/src/assets"],
23+
"styles": ["docs/src/styles.scss"],
24+
"scripts": []
25+
},
26+
"configurations": {
27+
"production": {
28+
"budgets": [
29+
{
30+
"type": "initial",
31+
"maximumWarning": "500kb",
32+
"maximumError": "1mb"
33+
},
34+
{
35+
"type": "anyComponentStyle",
36+
"maximumWarning": "2kb",
37+
"maximumError": "4kb"
38+
}
39+
],
40+
"outputHashing": "all"
41+
},
42+
"development": {
43+
"optimization": false,
44+
"extractLicenses": false,
45+
"sourceMap": true
46+
}
47+
},
48+
"defaultConfiguration": "production"
49+
},
50+
"serve": {
51+
"executor": "@angular-devkit/build-angular:dev-server",
52+
"configurations": {
53+
"production": {
54+
"buildTarget": "docs:build:production"
55+
},
56+
"development": {
57+
"buildTarget": "docs:build:development"
58+
}
59+
},
60+
"defaultConfiguration": "development"
61+
},
62+
"extract-i18n": {
63+
"executor": "@angular-devkit/build-angular:extract-i18n",
64+
"options": {
65+
"buildTarget": "docs:build"
66+
}
67+
},
68+
"test": {
69+
"executor": "@angular-devkit/build-angular:karma",
70+
"options": {
71+
"polyfills": ["zone.js", "zone.js/testing"],
72+
"tsConfig": "docs/tsconfig.spec.json",
73+
"inlineStyleLanguage": "scss",
74+
"assets": ["docs/src/favicon.ico", "docs/src/assets"],
75+
"styles": ["docs/src/styles.scss"],
76+
"scripts": []
77+
}
78+
}
79+
}
80+
}

docs/src/app/app.component.html

Whitespace-only changes.

docs/src/app/app.component.scss

Whitespace-only changes.

docs/src/app/app.component.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Component } from '@angular/core';
2+
import { RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'adoc-root',
6+
standalone: true,
7+
imports: [RouterOutlet],
8+
templateUrl: './app.component.html',
9+
styleUrl: './app.component.scss',
10+
})
11+
export class AppComponent {}

docs/src/app/app.config.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
4+
import { routes } from './app.routes';
5+
6+
export const appConfig: ApplicationConfig = {
7+
providers: [provideRouter(routes)],
8+
};

docs/src/app/app.routes.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Routes } from '@angular/router';
2+
3+
export const routes: Routes = [];

docs/src/assets/.gitkeep

Whitespace-only changes.

docs/src/favicon.ico

14.7 KB
Binary file not shown.

docs/src/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Docs</title>
6+
<base href="/" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<link rel="icon" type="image/x-icon" href="favicon.ico" />
9+
</head>
10+
<body>
11+
<adoc-root></adoc-root>
12+
</body>
13+
</html>

docs/src/main.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable no-console */
2+
import { bootstrapApplication } from '@angular/platform-browser';
3+
4+
import { AppComponent } from './app/app.component';
5+
import { appConfig } from './app/app.config';
6+
7+
bootstrapApplication(AppComponent, appConfig).catch((err) =>
8+
console.error(err),
9+
);

docs/src/styles.scss

Whitespace-only changes.

docs/tsconfig.app.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app",
5+
"types": []
6+
},
7+
"files": ["src/main.ts"],
8+
"include": ["src/**/*.d.ts"]
9+
}

docs/tsconfig.spec.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/spec",
5+
"types": ["jasmine"]
6+
},
7+
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
8+
}

nx.json

+26
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44
"generators": {
55
"@schematics/angular:library": {
66
"prefix": "agl"
7+
},
8+
"@schematics/angular:component": {
9+
"style": "scss",
10+
"changeDetection": "OnPush",
11+
"skipTests": true
12+
},
13+
"@schematics/angular:class": {
14+
"skipTests": true
15+
},
16+
"@schematics/angular:directive": {
17+
"skipTests": true
18+
},
19+
"@schematics/angular:guard": {
20+
"skipTests": true
21+
},
22+
"@schematics/angular:interceptor": {
23+
"skipTests": true
24+
},
25+
"@schematics/angular:pipe": {
26+
"skipTests": true
27+
},
28+
"@schematics/angular:resolver": {
29+
"skipTests": true
30+
},
31+
"@schematics/angular:service": {
32+
"skipTests": true
733
}
834
},
935
"targetDefaults": {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
"strictInputAccessModifiers": true,
3939
"strictTemplates": true,
4040
},
41-
"include": ["packages"],
41+
"include": ["packages", "docs"],
4242
}

0 commit comments

Comments
 (0)