create-analog 2.1.0-beta.4 → 2.1.0-beta.6
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 +11 -6
- package/package.json +2 -1
- package/template-angular-v17/package.json +5 -5
- package/template-angular-v18/package.json +5 -5
- package/template-angular-v19/package.json +5 -5
- package/template-angular-v20/.editorconfig +16 -0
- package/template-angular-v20/.vscode/extensions.json +4 -0
- package/template-angular-v20/.vscode/launch.json +19 -0
- package/template-angular-v20/.vscode/tasks.json +42 -0
- package/template-angular-v20/README.md +26 -0
- package/template-angular-v20/_gitignore +47 -0
- package/template-angular-v20/angular.json +54 -0
- package/template-angular-v20/index.html +15 -0
- package/template-angular-v20/package.json +56 -0
- package/template-angular-v20/public/.gitkeep +0 -0
- package/template-angular-v20/public/analog.svg +1 -0
- package/template-angular-v20/public/favicon.ico +0 -0
- package/template-angular-v20/public/vite.svg +1 -0
- package/template-angular-v20/src/app/app.config.server.ts +10 -0
- package/template-angular-v20/src/app/app.config.ts +25 -0
- package/template-angular-v20/src/app/app.spec.ts +20 -0
- package/template-angular-v20/src/app/app.ts +17 -0
- package/template-angular-v20/src/app/pages/analog-welcome.ts +264 -0
- package/template-angular-v20/src/app/pages/index.page.ts +12 -0
- package/template-angular-v20/src/main.server.ts +8 -0
- package/template-angular-v20/src/main.ts +7 -0
- package/template-angular-v20/src/server/routes/api/v1/hello.ts +3 -0
- package/template-angular-v20/src/styles.css +4 -0
- package/template-angular-v20/src/test-setup.ts +13 -0
- package/template-angular-v20/src/vite-env.d.ts +1 -0
- package/template-angular-v20/tsconfig.app.json +14 -0
- package/template-angular-v20/tsconfig.json +34 -0
- package/template-angular-v20/tsconfig.spec.json +11 -0
- package/template-angular-v20/vite.config.ts +27 -0
- package/template-blog/package.json +19 -23
- package/template-blog/src/main.server.ts +0 -1
- package/template-blog/src/main.ts +0 -1
- package/template-blog/src/test-setup.ts +3 -11
- package/template-blog/vite.config.ts +0 -3
- package/template-latest/package.json +19 -23
- package/template-latest/src/app/app.config.ts +0 -2
- package/template-latest/src/main.server.ts +0 -1
- package/template-latest/src/main.ts +0 -1
- package/template-latest/src/test-setup.ts +3 -11
- package/template-latest/vite.config.ts +0 -3
- package/template-minimal/package.json +19 -23
- package/template-minimal/src/app/app.config.ts +0 -2
- package/template-minimal/src/main.server.ts +0 -1
- package/template-minimal/src/main.ts +0 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-analog-welcome',
|
|
5
|
+
styles: [
|
|
6
|
+
`
|
|
7
|
+
:host {
|
|
8
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
9
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
|
|
10
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
11
|
+
'Noto Color Emoji';
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 2rem 1rem 8rem;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
background: rgb(250 250 250);
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
a {
|
|
19
|
+
color: inherit;
|
|
20
|
+
text-decoration: inherit;
|
|
21
|
+
}
|
|
22
|
+
.main {
|
|
23
|
+
margin: 0 auto;
|
|
24
|
+
flex: 1 1 0;
|
|
25
|
+
}
|
|
26
|
+
.intro-section {
|
|
27
|
+
padding-top: 1.5rem;
|
|
28
|
+
padding-bottom: 2rem;
|
|
29
|
+
}
|
|
30
|
+
.intro-section > * + * {
|
|
31
|
+
margin-top: 1.5rem;
|
|
32
|
+
}
|
|
33
|
+
@media (min-width: 768px) {
|
|
34
|
+
.intro-section {
|
|
35
|
+
padding-top: 2.5rem;
|
|
36
|
+
padding-bottom: 3rem;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@media (min-width: 1024px) {
|
|
40
|
+
.intro-section {
|
|
41
|
+
padding-top: 8rem;
|
|
42
|
+
padding-bottom: 8rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.intro-container {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
text-align: center;
|
|
49
|
+
gap: 1rem;
|
|
50
|
+
align-items: center;
|
|
51
|
+
max-width: 64rem;
|
|
52
|
+
}
|
|
53
|
+
.intro-logo {
|
|
54
|
+
height: 3rem;
|
|
55
|
+
width: 3rem;
|
|
56
|
+
}
|
|
57
|
+
.intro-badge {
|
|
58
|
+
transition-property: color, background-color, border-color,
|
|
59
|
+
text-decoration-color, fill, stroke;
|
|
60
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
61
|
+
transition-duration: 150ms;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
font-size: 0.875rem;
|
|
64
|
+
line-height: 1.25rem;
|
|
65
|
+
padding: 0.375rem 1rem;
|
|
66
|
+
background-color: rgb(228 228 231);
|
|
67
|
+
border-radius: 1rem;
|
|
68
|
+
}
|
|
69
|
+
.intro-heading {
|
|
70
|
+
margin: 0;
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (min-width: 640px) {
|
|
75
|
+
.intro-heading {
|
|
76
|
+
font-size: 3rem;
|
|
77
|
+
line-height: 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
@media (min-width: 768px) {
|
|
81
|
+
.intro-heading {
|
|
82
|
+
font-size: 3.75rem;
|
|
83
|
+
line-height: 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
@media (min-width: 1024px) {
|
|
87
|
+
.intro-heading {
|
|
88
|
+
font-size: 4.5rem;
|
|
89
|
+
line-height: 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.intro-analog {
|
|
93
|
+
color: #dd0031;
|
|
94
|
+
}
|
|
95
|
+
.intro-description {
|
|
96
|
+
line-height: 1.5;
|
|
97
|
+
max-width: 42rem;
|
|
98
|
+
margin: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@media (min-width: 640px) {
|
|
102
|
+
.intro-description {
|
|
103
|
+
line-height: 2rem;
|
|
104
|
+
font-size: 1.25rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.btn-container > * + * {
|
|
108
|
+
margin-left: 1rem;
|
|
109
|
+
}
|
|
110
|
+
.darkBtn {
|
|
111
|
+
transition-property: color, background-color, border-color,
|
|
112
|
+
text-decoration-color, fill, stroke;
|
|
113
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
114
|
+
transition-duration: 150ms;
|
|
115
|
+
color: rgb(250 250 250);
|
|
116
|
+
font-weight: 500;
|
|
117
|
+
font-size: 0.875rem;
|
|
118
|
+
line-height: 1.25rem;
|
|
119
|
+
padding-left: 2rem;
|
|
120
|
+
padding-right: 2rem;
|
|
121
|
+
background-color: rgb(9 9 11);
|
|
122
|
+
border-radius: 0.375rem;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
height: 2.75rem;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
}
|
|
129
|
+
.darkBtn:hover {
|
|
130
|
+
background-color: rgb(9 9 11 / 0.9);
|
|
131
|
+
}
|
|
132
|
+
.lightBtn {
|
|
133
|
+
transition-property: color, background-color, border-color,
|
|
134
|
+
text-decoration-color, fill, stroke;
|
|
135
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
136
|
+
transition-duration: 150ms;
|
|
137
|
+
color: rgb(24, 24, 27);
|
|
138
|
+
background: rgb(250 250 250);
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
font-size: 0.875rem;
|
|
141
|
+
line-height: 1.25rem;
|
|
142
|
+
padding-left: 2rem;
|
|
143
|
+
padding-right: 2rem;
|
|
144
|
+
border-radius: 0.375rem;
|
|
145
|
+
border: 1px solid rgb(229, 231, 235);
|
|
146
|
+
justify-content: center;
|
|
147
|
+
align-items: center;
|
|
148
|
+
height: 2.75rem;
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
}
|
|
152
|
+
.lightBtn:hover {
|
|
153
|
+
background-color: rgb(244 244 245);
|
|
154
|
+
}
|
|
155
|
+
.counter-section {
|
|
156
|
+
padding-top: 2rem;
|
|
157
|
+
padding-bottom: 2rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@media (min-width: 768px) {
|
|
161
|
+
.counter-section {
|
|
162
|
+
padding-top: 3rem;
|
|
163
|
+
padding-bottom: 3rem;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@media (min-width: 1024px) {
|
|
168
|
+
.counter-section {
|
|
169
|
+
padding-top: 6rem;
|
|
170
|
+
padding-bottom: 6rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
.counter-container {
|
|
174
|
+
text-align: center;
|
|
175
|
+
gap: 1rem;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
align-items: center;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
max-width: 58rem;
|
|
180
|
+
display: flex;
|
|
181
|
+
margin-left: auto;
|
|
182
|
+
margin-right: auto;
|
|
183
|
+
}
|
|
184
|
+
.counter-heading {
|
|
185
|
+
color: #dd0031;
|
|
186
|
+
line-height: 1.1;
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
font-size: 1.875rem;
|
|
189
|
+
margin: 0;
|
|
190
|
+
}
|
|
191
|
+
.counter-description {
|
|
192
|
+
line-height: 1.5;
|
|
193
|
+
max-width: 85%;
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media (min-width: 640px) {
|
|
198
|
+
.counter-description {
|
|
199
|
+
line-height: 1.75rem;
|
|
200
|
+
font-size: 1.125rem;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
.count {
|
|
204
|
+
margin-left: 0.25rem;
|
|
205
|
+
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
206
|
+
}
|
|
207
|
+
`,
|
|
208
|
+
],
|
|
209
|
+
template: `
|
|
210
|
+
<main class="main">
|
|
211
|
+
<section class="intro-section">
|
|
212
|
+
<div class="intro-container">
|
|
213
|
+
<img
|
|
214
|
+
class="intro-logo"
|
|
215
|
+
src="https://analogjs.org/img/logos/analog-logo.svg"
|
|
216
|
+
alt="AnalogJs logo. Two red triangles and a white analog wave in front"
|
|
217
|
+
/>
|
|
218
|
+
<a
|
|
219
|
+
class="intro-badge"
|
|
220
|
+
target="_blank"
|
|
221
|
+
href="https://twitter.com/analogjs"
|
|
222
|
+
>Follow along on Twitter</a
|
|
223
|
+
>
|
|
224
|
+
<h1 class="intro-heading">
|
|
225
|
+
<span class="intro-analog">Analog.</span> The fullstack Angular
|
|
226
|
+
meta-framework
|
|
227
|
+
</h1>
|
|
228
|
+
<p class="intro-description">
|
|
229
|
+
Analog is for building applications and websites with Angular.
|
|
230
|
+
<br />Powered by Vite.
|
|
231
|
+
</p>
|
|
232
|
+
<div class="btn-container">
|
|
233
|
+
<a class="darkBtn" href="https://analogjs.org">Read the docs</a>
|
|
234
|
+
<a
|
|
235
|
+
target="_blank"
|
|
236
|
+
rel="noreferrer"
|
|
237
|
+
class="lightBtn"
|
|
238
|
+
href="https://github.com/analogjs/analog"
|
|
239
|
+
>Star on GitHub</a
|
|
240
|
+
>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</section>
|
|
244
|
+
<section id="counter-demo" class="section">
|
|
245
|
+
<div class="counter-container">
|
|
246
|
+
<h2 class="counter-heading">Counter</h2>
|
|
247
|
+
<p class="counter-description">
|
|
248
|
+
This is a simple interactive counter. Powered by Angular.
|
|
249
|
+
</p>
|
|
250
|
+
<button (click)="increment()" class="lightBtn">
|
|
251
|
+
Count: <span class="count">{{ count }}</span>
|
|
252
|
+
</button>
|
|
253
|
+
</div>
|
|
254
|
+
</section>
|
|
255
|
+
</main>
|
|
256
|
+
`,
|
|
257
|
+
})
|
|
258
|
+
export class AnalogWelcome {
|
|
259
|
+
count = 0;
|
|
260
|
+
|
|
261
|
+
increment() {
|
|
262
|
+
this.count++;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '@angular/compiler';
|
|
2
|
+
import '@analogjs/vitest-angular/setup-zone';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
BrowserTestingModule,
|
|
6
|
+
platformBrowserTesting,
|
|
7
|
+
} from '@angular/platform-browser/testing';
|
|
8
|
+
import { getTestBed } from '@angular/core/testing';
|
|
9
|
+
|
|
10
|
+
getTestBed().initTestEnvironment(
|
|
11
|
+
BrowserTestingModule,
|
|
12
|
+
platformBrowserTesting()
|
|
13
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/app",
|
|
6
|
+
"types": []
|
|
7
|
+
},
|
|
8
|
+
"files": ["src/main.ts", "src/main.server.ts"],
|
|
9
|
+
"include": [
|
|
10
|
+
"src/**/*.d.ts",
|
|
11
|
+
"src/app/pages/**/*.page.ts",
|
|
12
|
+
"src/server/middleware/**/*.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "./",
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noImplicitOverride": true,
|
|
9
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noFallthroughCasesInSwitch": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"declaration": false,
|
|
14
|
+
"downlevelIteration": true,
|
|
15
|
+
"experimentalDecorators": true,
|
|
16
|
+
"moduleResolution": "bundler",
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"target": "ES2022",
|
|
20
|
+
"module": "ES2022",
|
|
21
|
+
"lib": ["ES2022", "dom"],
|
|
22
|
+
"useDefineForClassFields": false,
|
|
23
|
+
"skipLibCheck": true
|
|
24
|
+
},
|
|
25
|
+
"angularCompilerOptions": {
|
|
26
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
27
|
+
"strictInjectionParameters": true,
|
|
28
|
+
"strictInputAccessModifiers": true,
|
|
29
|
+
"strictTemplates": true
|
|
30
|
+
},
|
|
31
|
+
"references": [
|
|
32
|
+
{ "path": "tsconfig.spec.json" }
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/spec",
|
|
6
|
+
"target": "es2022",
|
|
7
|
+
"types": ["node", "vitest/globals"]
|
|
8
|
+
},
|
|
9
|
+
"files": ["src/test-setup.ts"],
|
|
10
|
+
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
import analog from '@analogjs/platform';__TAILWIND_IMPORT__
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig(({ mode }) => ({
|
|
8
|
+
build: {
|
|
9
|
+
target: ['es2020'],
|
|
10
|
+
},
|
|
11
|
+
resolve: {
|
|
12
|
+
mainFields: ['module'],
|
|
13
|
+
},
|
|
14
|
+
plugins: [
|
|
15
|
+
analog(),__TAILWIND_PLUGIN__
|
|
16
|
+
],
|
|
17
|
+
test: {
|
|
18
|
+
globals: true,
|
|
19
|
+
environment: 'jsdom',
|
|
20
|
+
setupFiles: ['src/test-setup.ts'],
|
|
21
|
+
include: ['**/*.spec.ts'],
|
|
22
|
+
reporters: ['default'],
|
|
23
|
+
},
|
|
24
|
+
define: {
|
|
25
|
+
'import.meta.vitest': mode !== 'production',
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
@@ -16,40 +16,36 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^2.1.0-beta.
|
|
20
|
-
"@analogjs/router": "^2.1.0-beta.
|
|
21
|
-
"@angular/animations": "^
|
|
22
|
-
"@angular/common": "^
|
|
23
|
-
"@angular/compiler": "^
|
|
24
|
-
"@angular/core": "^
|
|
25
|
-
"@angular/forms": "^
|
|
26
|
-
"@angular/platform-browser": "^
|
|
27
|
-
"@angular/platform-server": "^
|
|
28
|
-
"@angular/router": "^
|
|
19
|
+
"@analogjs/content": "^2.1.0-beta.6",
|
|
20
|
+
"@analogjs/router": "^2.1.0-beta.6",
|
|
21
|
+
"@angular/animations": "^21.0.0",
|
|
22
|
+
"@angular/common": "^21.0.0",
|
|
23
|
+
"@angular/compiler": "^21.0.0",
|
|
24
|
+
"@angular/core": "^21.0.0",
|
|
25
|
+
"@angular/forms": "^21.0.0",
|
|
26
|
+
"@angular/platform-browser": "^21.0.0",
|
|
27
|
+
"@angular/platform-server": "^21.0.0",
|
|
28
|
+
"@angular/router": "^21.0.0",
|
|
29
29
|
"front-matter": "^4.0.2",
|
|
30
30
|
"marked": "^15.0.7",
|
|
31
31
|
"marked-gfm-heading-id": "^4.1.1",
|
|
32
32
|
"marked-highlight": "^2.2.1",
|
|
33
33
|
"marked-mangle": "^1.1.10",
|
|
34
34
|
"rxjs": "~7.8.0",
|
|
35
|
-
"tslib": "^2.3.0"
|
|
36
|
-
"zone.js": "~0.15.0"
|
|
35
|
+
"tslib": "^2.3.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@analogjs/platform": "^2.1.0-beta.
|
|
40
|
-
"@analogjs/vite-plugin-angular": "^2.1.0-beta.
|
|
41
|
-
"@analogjs/vitest-angular": "^2.1.0-beta.
|
|
42
|
-
"@angular-devkit/build-angular": "^
|
|
43
|
-
"@angular/build": "^
|
|
44
|
-
"@angular/cli": "^
|
|
45
|
-
"@angular/compiler-cli": "^
|
|
38
|
+
"@analogjs/platform": "^2.1.0-beta.6",
|
|
39
|
+
"@analogjs/vite-plugin-angular": "^2.1.0-beta.6",
|
|
40
|
+
"@analogjs/vitest-angular": "^2.1.0-beta.6",
|
|
41
|
+
"@angular-devkit/build-angular": "^21.0.0",
|
|
42
|
+
"@angular/build": "^21.0.0",
|
|
43
|
+
"@angular/cli": "^21.0.0",
|
|
44
|
+
"@angular/compiler-cli": "^21.0.0",
|
|
46
45
|
"jsdom": "^22.0.0",
|
|
47
|
-
"typescript": "~5.
|
|
46
|
+
"typescript": "~5.9.0",
|
|
48
47
|
"vite": "^7.0.0",
|
|
49
48
|
"vite-tsconfig-paths": "^4.2.0",
|
|
50
49
|
"vitest": "^4.0.0"
|
|
51
|
-
},
|
|
52
|
-
"overrides": {
|
|
53
|
-
"vitest": "$vitest"
|
|
54
50
|
}
|
|
55
51
|
}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import '@angular/compiler';
|
|
2
|
-
import '@analogjs/vitest-angular/setup-
|
|
2
|
+
import '@analogjs/vitest-angular/setup-snapshots';
|
|
3
|
+
import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
BrowserTestingModule,
|
|
6
|
-
platformBrowserTesting,
|
|
7
|
-
} from '@angular/platform-browser/testing';
|
|
8
|
-
import { getTestBed } from '@angular/core/testing';
|
|
9
|
-
|
|
10
|
-
getTestBed().initTestEnvironment(
|
|
11
|
-
BrowserTestingModule,
|
|
12
|
-
platformBrowserTesting()
|
|
13
|
-
);
|
|
5
|
+
setupTestBed();
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^2.1.0-beta.
|
|
20
|
-
"@analogjs/router": "^2.1.0-beta.
|
|
21
|
-
"@angular/animations": "^
|
|
22
|
-
"@angular/common": "^
|
|
23
|
-
"@angular/compiler": "^
|
|
24
|
-
"@angular/core": "^
|
|
25
|
-
"@angular/forms": "^
|
|
26
|
-
"@angular/platform-browser": "^
|
|
27
|
-
"@angular/platform-server": "^
|
|
28
|
-
"@angular/router": "^
|
|
19
|
+
"@analogjs/content": "^2.1.0-beta.6",
|
|
20
|
+
"@analogjs/router": "^2.1.0-beta.6",
|
|
21
|
+
"@angular/animations": "^21.0.0",
|
|
22
|
+
"@angular/common": "^21.0.0",
|
|
23
|
+
"@angular/compiler": "^21.0.0",
|
|
24
|
+
"@angular/core": "^21.0.0",
|
|
25
|
+
"@angular/forms": "^21.0.0",
|
|
26
|
+
"@angular/platform-browser": "^21.0.0",
|
|
27
|
+
"@angular/platform-server": "^21.0.0",
|
|
28
|
+
"@angular/router": "^21.0.0",
|
|
29
29
|
"front-matter": "^4.0.2",
|
|
30
30
|
"marked": "^15.0.7",
|
|
31
31
|
"marked-gfm-heading-id": "^4.1.1",
|
|
@@ -33,24 +33,20 @@
|
|
|
33
33
|
"marked-mangle": "^1.1.10",
|
|
34
34
|
"prismjs": "^1.29.0",
|
|
35
35
|
"rxjs": "~7.8.0",
|
|
36
|
-
"tslib": "^2.3.0"
|
|
37
|
-
"zone.js": "~0.15.0"
|
|
36
|
+
"tslib": "^2.3.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@analogjs/platform": "^2.1.0-beta.
|
|
41
|
-
"@analogjs/vite-plugin-angular": "^2.1.0-beta.
|
|
42
|
-
"@analogjs/vitest-angular": "^2.1.0-beta.
|
|
43
|
-
"@angular-devkit/build-angular": "^
|
|
44
|
-
"@angular/build": "^
|
|
45
|
-
"@angular/cli": "^
|
|
46
|
-
"@angular/compiler-cli": "^
|
|
39
|
+
"@analogjs/platform": "^2.1.0-beta.6",
|
|
40
|
+
"@analogjs/vite-plugin-angular": "^2.1.0-beta.6",
|
|
41
|
+
"@analogjs/vitest-angular": "^2.1.0-beta.6",
|
|
42
|
+
"@angular-devkit/build-angular": "^21.0.0",
|
|
43
|
+
"@angular/build": "^21.0.0",
|
|
44
|
+
"@angular/cli": "^21.0.0",
|
|
45
|
+
"@angular/compiler-cli": "^21.0.0",
|
|
47
46
|
"jsdom": "^22.0.0",
|
|
48
|
-
"typescript": "~5.
|
|
47
|
+
"typescript": "~5.9.0",
|
|
49
48
|
"vite": "^7.0.0",
|
|
50
49
|
"vite-tsconfig-paths": "^4.2.0",
|
|
51
50
|
"vitest": "^4.0.0"
|
|
52
|
-
},
|
|
53
|
-
"overrides": {
|
|
54
|
-
"vitest": "$vitest"
|
|
55
51
|
}
|
|
56
52
|
}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
ApplicationConfig,
|
|
8
8
|
provideBrowserGlobalErrorListeners,
|
|
9
|
-
provideZoneChangeDetection
|
|
10
9
|
} from '@angular/core';
|
|
11
10
|
import { provideClientHydration, withEventReplay } from '@angular/platform-browser';
|
|
12
11
|
import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';
|
|
@@ -14,7 +13,6 @@ import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';
|
|
|
14
13
|
export const appConfig: ApplicationConfig = {
|
|
15
14
|
providers: [
|
|
16
15
|
provideBrowserGlobalErrorListeners(),
|
|
17
|
-
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
18
16
|
provideFileRouter(),
|
|
19
17
|
provideHttpClient(
|
|
20
18
|
withFetch(),
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import '@angular/compiler';
|
|
2
|
-
import '@analogjs/vitest-angular/setup-
|
|
2
|
+
import '@analogjs/vitest-angular/setup-snapshots';
|
|
3
|
+
import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
BrowserTestingModule,
|
|
6
|
-
platformBrowserTesting,
|
|
7
|
-
} from '@angular/platform-browser/testing';
|
|
8
|
-
import { getTestBed } from '@angular/core/testing';
|
|
9
|
-
|
|
10
|
-
getTestBed().initTestEnvironment(
|
|
11
|
-
BrowserTestingModule,
|
|
12
|
-
platformBrowserTesting()
|
|
13
|
-
);
|
|
5
|
+
setupTestBed();
|