create-analog 2.0.0-alpha.11 → 2.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +2 -1
- package/template-angular-v16/package.json +5 -5
- package/template-angular-v17/package.json +5 -5
- package/template-angular-v18/package.json +5 -5
- package/template-angular-v19/.editorconfig +16 -0
- package/template-angular-v19/.vscode/extensions.json +4 -0
- package/template-angular-v19/.vscode/launch.json +19 -0
- package/template-angular-v19/.vscode/tasks.json +42 -0
- package/template-angular-v19/README.md +26 -0
- package/template-angular-v19/_gitignore +44 -0
- package/template-angular-v19/angular.json +54 -0
- package/template-angular-v19/index.html +15 -0
- package/template-angular-v19/package.json +53 -0
- package/template-angular-v19/public/.gitkeep +0 -0
- package/template-angular-v19/public/analog.svg +1 -0
- package/template-angular-v19/public/favicon.ico +0 -0
- package/template-angular-v19/public/vite.svg +1 -0
- package/template-angular-v19/src/app/app-root.ag +16 -0
- package/template-angular-v19/src/app/app-root.spec.ts +20 -0
- package/{template-latest → template-angular-v19}/src/app/app.component.ts +0 -1
- package/template-angular-v19/src/app/app.config.server.ts +10 -0
- package/template-angular-v19/src/app/app.config.ts +20 -0
- package/template-angular-v19/src/app/pages/index.page.ag +53 -0
- package/template-angular-v19/src/app/pages/index.page.ts +54 -0
- package/template-angular-v19/src/main.server.ts +8 -0
- package/template-angular-v19/src/main.ts +7 -0
- package/template-angular-v19/src/server/routes/api/v1/hello.ts +3 -0
- package/template-angular-v19/src/styles.css +80 -0
- package/template-angular-v19/src/test-setup.ts +12 -0
- package/template-angular-v19/src/vite-env.d.ts +1 -0
- package/template-angular-v19/tsconfig.app.json +14 -0
- package/template-angular-v19/tsconfig.json +32 -0
- package/template-angular-v19/tsconfig.spec.json +11 -0
- package/template-angular-v19/vite.config.ts +27 -0
- package/template-blog/package.json +6 -6
- package/template-blog/src/app/app.config.ts +8 -3
- package/{template-latest/src/app/app.component.spec.ts → template-blog/src/app/app.spec.ts} +1 -1
- package/template-blog/src/app/{app.component.ts → app.ts} +0 -1
- package/template-blog/src/app/pages/blog/[slug].page.ts +0 -1
- package/template-blog/src/app/pages/blog/index.page.ts +0 -1
- package/template-blog/src/test-setup.ts +6 -5
- package/template-blog/tsconfig.json +4 -2
- package/template-latest/package.json +6 -6
- package/template-latest/src/app/app.config.ts +8 -3
- package/template-latest/src/app/app.spec.ts +20 -0
- package/template-latest/src/app/app.ts +17 -0
- package/template-latest/src/app/pages/analog-welcome.ts +263 -0
- package/template-latest/src/app/pages/index.page.ag +2 -48
- package/template-latest/src/app/pages/index.page.ts +5 -47
- package/template-latest/src/styles.css +3 -79
- package/template-latest/src/test-setup.ts +6 -5
- package/template-latest/tsconfig.json +4 -2
- package/template-minimal/package.json +6 -6
- package/template-minimal/src/app/app.config.ts +8 -3
- package/template-minimal/src/app/{app.component.ts → app.ts} +0 -1
- package/template-minimal/src/app/pages/index.page.ts +0 -1
- /package/{template-blog → template-angular-v19}/src/app/app.component.spec.ts +0 -0
|
@@ -1,53 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const count = signal(0);
|
|
5
|
-
|
|
6
|
-
function increment() {
|
|
7
|
-
this.count.update((count) => count + 1);
|
|
8
|
-
}
|
|
2
|
+
import AnalogWelcome from './analog-welcome' with { analog: 'imports '};
|
|
9
3
|
</script>
|
|
10
4
|
|
|
11
5
|
<template>
|
|
12
|
-
<
|
|
13
|
-
<a href="https://analogjs.org/" target="_blank">
|
|
14
|
-
<img alt="Analog Logo" class="logo analog" src="/analog.svg" />
|
|
15
|
-
</a>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<h2>Analog</h2>
|
|
19
|
-
|
|
20
|
-
<h3>The fullstack meta-framework for Angular!</h3>
|
|
21
|
-
|
|
22
|
-
<div class="card">
|
|
23
|
-
<button type="button" (click)="increment()">Count {{ count() }}</button>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<p class="read-the-docs">
|
|
27
|
-
<a href="https://analogjs.org" target="_blank">Docs</a> |
|
|
28
|
-
<a href="https://github.com/analogjs/analog" target="_blank">GitHub</a> |
|
|
29
|
-
<a href="https://github.com/sponsors/brandonroberts" target="_blank">
|
|
30
|
-
Sponsor
|
|
31
|
-
</a>
|
|
32
|
-
</p>
|
|
6
|
+
<AnalogWelcome />
|
|
33
7
|
</template>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.logo {
|
|
37
|
-
will-change: filter;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.logo:hover {
|
|
41
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.read-the-docs > * {
|
|
45
|
-
color: #fff;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (prefers-color-scheme: light) {
|
|
49
|
-
.read-the-docs > * {
|
|
50
|
-
color: #213547;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
@@ -1,55 +1,13 @@
|
|
|
1
|
-
import { Component
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { AnalogWelcome } from './analog-welcome';
|
|
2
4
|
|
|
3
5
|
@Component({
|
|
4
6
|
selector: 'app-home',
|
|
5
|
-
|
|
7
|
+
imports: [AnalogWelcome],
|
|
6
8
|
template: `
|
|
7
|
-
|
|
8
|
-
<a href="https://analogjs.org/" target="_blank">
|
|
9
|
-
<img alt="Analog Logo" class="logo analog" src="/analog.svg" />
|
|
10
|
-
</a>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<h2>Analog</h2>
|
|
14
|
-
|
|
15
|
-
<h3>The fullstack meta-framework for Angular!</h3>
|
|
16
|
-
|
|
17
|
-
<div class="card">
|
|
18
|
-
<button type="button" (click)="increment()">Count {{ count() }}</button>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<p class="read-the-docs">
|
|
22
|
-
<a href="https://analogjs.org" target="_blank">Docs</a> |
|
|
23
|
-
<a href="https://github.com/analogjs/analog" target="_blank">GitHub</a> |
|
|
24
|
-
<a href="https://github.com/sponsors/brandonroberts" target="_blank">
|
|
25
|
-
Sponsor
|
|
26
|
-
</a>
|
|
27
|
-
</p>
|
|
28
|
-
`,
|
|
29
|
-
styles: `
|
|
30
|
-
.logo {
|
|
31
|
-
will-change: filter;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.logo:hover {
|
|
35
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.read-the-docs > * {
|
|
39
|
-
color: #fff;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@media (prefers-color-scheme: light) {
|
|
43
|
-
.read-the-docs > * {
|
|
44
|
-
color: #213547;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
9
|
+
<app-analog-welcome/>
|
|
47
10
|
`,
|
|
48
11
|
})
|
|
49
12
|
export default class HomeComponent {
|
|
50
|
-
count = signal(0);
|
|
51
|
-
|
|
52
|
-
increment() {
|
|
53
|
-
this.count.update((count) => count + 1);
|
|
54
|
-
}
|
|
55
13
|
}
|
|
@@ -1,80 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
:
|
|
3
|
-
|
|
4
|
-
font-size: 16px;
|
|
5
|
-
line-height: 24px;
|
|
6
|
-
font-weight: 400;
|
|
7
|
-
|
|
8
|
-
color-scheme: light dark;
|
|
9
|
-
color: rgba(255, 255, 255, 0.87);
|
|
10
|
-
background-color: #242424;
|
|
11
|
-
|
|
12
|
-
font-synthesis: none;
|
|
13
|
-
text-rendering: optimizeLegibility;
|
|
14
|
-
-webkit-font-smoothing: antialiased;
|
|
15
|
-
-moz-osx-font-smoothing: grayscale;
|
|
16
|
-
-webkit-text-size-adjust: 100%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
a {
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
color: #646cff;
|
|
22
|
-
text-decoration: inherit;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
a:hover {
|
|
26
|
-
color: #535bf2;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
body {
|
|
30
|
-
margin: 0;
|
|
31
|
-
display: flex;
|
|
32
|
-
place-items: center;
|
|
33
|
-
min-width: 320px;
|
|
34
|
-
min-height: 100vh;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
h1 {
|
|
38
|
-
font-size: 3.2em;
|
|
39
|
-
line-height: 1.1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
button {
|
|
43
|
-
border-radius: 8px;
|
|
44
|
-
border: 1px solid transparent;
|
|
45
|
-
padding: 0.6em 1.2em;
|
|
46
|
-
font-size: 1em;
|
|
47
|
-
font-weight: 500;
|
|
48
|
-
font-family: inherit;
|
|
49
|
-
background-color: #1a1a1a;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
transition: border-color 0.25s;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
button:hover {
|
|
55
|
-
border-color: #646cff;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
button:focus,
|
|
59
|
-
button:focus-visible {
|
|
60
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.card {
|
|
64
|
-
padding: 2em;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@media (prefers-color-scheme: light) {
|
|
68
|
-
:root {
|
|
69
|
-
color: #213547;
|
|
70
|
-
background-color: #ffffff;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
a:hover {
|
|
74
|
-
color: #747bff;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
button {
|
|
78
|
-
background-color: #f9f9f9;
|
|
79
|
-
}
|
|
1
|
+
html, body {
|
|
2
|
+
display: block;
|
|
3
|
+
height: 100%;
|
|
80
4
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import '@angular/compiler';
|
|
1
2
|
import '@analogjs/vitest-angular/setup-zone';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from '@angular/platform-browser
|
|
5
|
+
BrowserTestingModule,
|
|
6
|
+
platformBrowserTesting,
|
|
7
|
+
} from '@angular/platform-browser/testing';
|
|
7
8
|
import { getTestBed } from '@angular/core/testing';
|
|
8
9
|
|
|
9
10
|
getTestBed().initTestEnvironment(
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
BrowserTestingModule,
|
|
12
|
+
platformBrowserTesting()
|
|
12
13
|
);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
1
|
{
|
|
3
2
|
"compileOnSave": false,
|
|
4
3
|
"compilerOptions": {
|
|
@@ -28,5 +27,8 @@
|
|
|
28
27
|
"strictInjectionParameters": true,
|
|
29
28
|
"strictInputAccessModifiers": true,
|
|
30
29
|
"strictTemplates": true
|
|
31
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"references": [
|
|
32
|
+
{ "path": "tsconfig.spec.json" }
|
|
33
|
+
]
|
|
32
34
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=20.19.1"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"ng": "ng",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"private": true,
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@analogjs/content": "^2.0.0-alpha.
|
|
19
|
-
"@analogjs/router": "^2.0.0-alpha.
|
|
18
|
+
"@analogjs/content": "^2.0.0-alpha.13",
|
|
19
|
+
"@analogjs/router": "^2.0.0-alpha.13",
|
|
20
20
|
"@angular/animations": "^19.0.0",
|
|
21
21
|
"@angular/common": "^19.0.0",
|
|
22
22
|
"@angular/compiler": "^19.0.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"zone.js": "~0.15.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@analogjs/platform": "^2.0.0-alpha.
|
|
41
|
-
"@analogjs/vite-plugin-angular": "^2.0.0-alpha.
|
|
42
|
-
"@analogjs/vitest-angular": "^2.0.0-alpha.
|
|
40
|
+
"@analogjs/platform": "^2.0.0-alpha.13",
|
|
41
|
+
"@analogjs/vite-plugin-angular": "^2.0.0-alpha.13",
|
|
42
|
+
"@analogjs/vitest-angular": "^2.0.0-alpha.13",
|
|
43
43
|
"@angular-devkit/build-angular": "^19.0.0",
|
|
44
44
|
"@angular/build": "^19.0.0",
|
|
45
45
|
"@angular/cli": "^19.0.0",
|
|
@@ -3,18 +3,23 @@ import {
|
|
|
3
3
|
withFetch,
|
|
4
4
|
withInterceptors,
|
|
5
5
|
} from '@angular/common/http';
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
ApplicationConfig,
|
|
8
|
+
provideBrowserGlobalErrorListeners,
|
|
9
|
+
provideZoneChangeDetection
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
|
|
8
12
|
import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';
|
|
9
13
|
|
|
10
14
|
export const appConfig: ApplicationConfig = {
|
|
11
15
|
providers: [
|
|
16
|
+
provideBrowserGlobalErrorListeners(),
|
|
12
17
|
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
13
18
|
provideFileRouter(),
|
|
14
19
|
provideHttpClient(
|
|
15
20
|
withFetch(),
|
|
16
21
|
withInterceptors([requestContextInterceptor])
|
|
17
22
|
),
|
|
18
|
-
provideClientHydration(),
|
|
23
|
+
provideClientHydration(withEventReplay()),
|
|
19
24
|
],
|
|
20
25
|
};
|
|
File without changes
|