Skip to content

Commit c1d7700

Browse files
committed
docs app generated
1 parent 24856a8 commit c1d7700

25 files changed

+518
-156
lines changed

apps/docs/.eslintrc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": ["plugin:@nx/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
8+
"rules": {
9+
"@angular-eslint/directive-selector": [
10+
"error",
11+
{
12+
"type": "attribute",
13+
"prefix": "Docs",
14+
"style": "camelCase"
15+
}
16+
],
17+
"@angular-eslint/component-selector": [
18+
"error",
19+
{
20+
"type": "element",
21+
"prefix": "docs",
22+
"style": "kebab-case"
23+
}
24+
]
25+
}
26+
},
27+
{
28+
"files": ["*.html"],
29+
"extends": ["plugin:@nx/nx/angular-template"],
30+
"rules": {}
31+
}
32+
]
33+
}

apps/docs/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>MyApp</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+
<link rel="stylesheet" href="/src/styles.css" />
10+
</head>
11+
<body>
12+
<docs-root></docs-root>
13+
<script type="module" src="/src/main.ts"></script>
14+
</body>
15+
</html>

apps/docs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

apps/docs/postcss.config.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const { join } = require('node:path');
2+
3+
module.exports = {
4+
plugins: {
5+
tailwindcss: {
6+
config: join(__dirname, 'tailwind.config.cjs'),
7+
},
8+
autoprefixer: {},
9+
},
10+
};

apps/docs/project.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "docs",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"targets": {
6+
"build": {
7+
"executor": "@analogjs/platform:vite",
8+
"defaultConfiguration": "production",
9+
"configurations": {
10+
"development": {
11+
"mode": "development"
12+
},
13+
"production": {
14+
"sourcemap": false,
15+
"mode": "production"
16+
}
17+
},
18+
"outputs": [
19+
"{options.outputPath}",
20+
"{workspaceRoot}/dist/apps/docs/.nitro",
21+
"{workspaceRoot}/dist/apps/docs/ssr",
22+
"{workspaceRoot}/dist/apps/docs/analog"
23+
],
24+
"options": {
25+
"main": "apps/docs/src/main.ts",
26+
"configFile": "apps/docs/vite.config.ts",
27+
"outputPath": "dist/apps/docs/client",
28+
"tsConfig": "apps/docs/tsconfig.app.json"
29+
}
30+
},
31+
"serve": {
32+
"executor": "@analogjs/platform:vite-dev-server",
33+
"defaultConfiguration": "development",
34+
"options": {
35+
"buildTarget": "docs:build",
36+
"port": 4200
37+
},
38+
"configurations": {
39+
"development": {
40+
"buildTarget": "docs:build:development",
41+
"hmr": true
42+
},
43+
"production": {
44+
"buildTarget": "docs:build:production"
45+
}
46+
}
47+
}
48+
},
49+
"tags": [],
50+
"sourceRoot": "apps/docs/src"
51+
}

apps/docs/public/.gitkeep

Whitespace-only changes.

apps/docs/public/analog.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/docs/public/favicon.ico

1.6 KB
Binary file not shown.

apps/docs/src/app/app.component.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
import { RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'docs-root',
6+
standalone: true,
7+
imports: [RouterOutlet],
8+
template: `
9+
<router-outlet></router-outlet>
10+
`,
11+
})
12+
export class AppComponent {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ApplicationConfig, mergeApplicationConfig } from '@angular/core';
2+
import { provideServerRendering, ɵSERVER_CONTEXT as SERVER_CONTEXT } from '@angular/platform-server';
3+
4+
import { appConfig } from './app.config';
5+
6+
const serverConfig: ApplicationConfig = {
7+
providers: [provideServerRendering(), { provide: SERVER_CONTEXT, useValue: 'ssr-analog' }],
8+
};
9+
10+
export const config = mergeApplicationConfig(appConfig, serverConfig);

0 commit comments

Comments
 (0)