create-vitrify 0.6.5 → 0.7.0
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/dist/templates.js +272 -46
- package/package.json +7 -7
- package/templates/fastify/_gitignore +3 -0
- package/templates/fastify/_prettierignore +3 -0
- package/templates/fastify/_prettierrc.json +22 -0
- package/templates/fastify/eslint.config.js +27 -0
- package/templates/fastify/src/setup.ts +12 -0
- package/templates/fastify/vitrify.config.ts +21 -0
- package/templates/quasar/eslint.config.js +27 -0
- package/templates/quasar/src/pages/IndexPage.vue +1 -1
- package/templates/quasar/src/router/routes.ts +3 -3
- package/templates/quasar/src/setup.ts +2 -1
- package/templates/quasar/vitrify.config.ts +9 -14
- package/templates/quasarmd3/.vscode/extensions.json +3 -0
- package/templates/quasarmd3/_gitignore +3 -0
- package/templates/quasarmd3/_prettierignore +3 -0
- package/templates/quasarmd3/_prettierrc.json +22 -0
- package/templates/quasarmd3/eslint.config.js +27 -0
- package/templates/quasarmd3/index.html +14 -0
- package/templates/quasarmd3/src/App.test.js +3 -0
- package/templates/quasarmd3/src/App.vue +35 -0
- package/templates/quasarmd3/src/assets/quasar-logo-vertical.svg +15 -0
- package/templates/quasarmd3/src/components/HelloWorld.vue +21 -0
- package/templates/quasarmd3/src/lang/en-US.ts +8 -0
- package/templates/quasarmd3/src/lang/index.ts +40 -0
- package/templates/quasarmd3/src/lang/nl.ts +8 -0
- package/templates/quasarmd3/src/layouts/MainLayout.vue +115 -0
- package/templates/quasarmd3/src/layouts/NavigationTabs.vue +7 -0
- package/templates/quasarmd3/src/pages/Error404Page.vue +29 -0
- package/templates/quasarmd3/src/pages/IndexPage/IndexPage.vue +15 -0
- package/templates/quasarmd3/src/pages/IndexPage/IndexPageFabs.vue +21 -0
- package/templates/quasarmd3/src/pwa.ts +21 -0
- package/templates/quasarmd3/src/router/index.ts +17 -0
- package/templates/quasarmd3/src/router/routes.ts +27 -0
- package/templates/quasarmd3/src/setup.ts +9 -0
- package/templates/quasarmd3/src/shims-vue.d.ts +6 -0
- package/templates/quasarmd3/vitrify.config.ts +204 -0
- package/templates/vue/.vscode/extensions.json +3 -0
- package/templates/vue/_gitignore +3 -0
- package/templates/vue/_prettierignore +3 -0
- package/templates/vue/_prettierrc.json +22 -0
- package/templates/vue/eslint.config.js +27 -0
- package/templates/vue/index.html +14 -0
- package/templates/vue/src/App.test.js +3 -0
- package/templates/vue/src/App.vue +20 -0
- package/templates/vue/src/components/HelloWorld.vue +9 -0
- package/templates/vue/src/layouts/MainLayout.vue +5 -0
- package/templates/vue/src/pages/Error404Page.vue +9 -0
- package/templates/vue/src/pages/IndexPage.vue +13 -0
- package/templates/vue/src/router/index.ts +17 -0
- package/templates/vue/src/router/routes.ts +19 -0
- package/templates/vue/src/setup.ts +9 -0
- package/templates/vue/src/shims-vue.d.ts +6 -0
- package/templates/vue/vitrify.config.ts +21 -0
- package/templates/quasar/_eslint.config.ts +0 -0
- package/templates/quasar/_eslintrc.cjs +0 -19
package/dist/templates.js
CHANGED
@@ -8,11 +8,11 @@ const getLatestVersions = async (dependencies) => {
|
|
8
8
|
return deps;
|
9
9
|
};
|
10
10
|
export const templates = {
|
11
|
-
|
12
|
-
name: '
|
13
|
-
fullName: '
|
14
|
-
description: '
|
15
|
-
url: new URL('../templates/
|
11
|
+
vue: {
|
12
|
+
name: 'vue',
|
13
|
+
fullName: 'Vue Project',
|
14
|
+
description: 'Plain Vue project',
|
15
|
+
url: new URL('../templates/vue/', import.meta.url),
|
16
16
|
pkgJson: {
|
17
17
|
scripts: {
|
18
18
|
dev: 'vitrify dev',
|
@@ -21,6 +21,9 @@ export const templates = {
|
|
21
21
|
'build:csr': 'vitrify build',
|
22
22
|
'build:ssr': 'vitrify build -m ssr',
|
23
23
|
'build:ssg': 'vitrify build -m ssg',
|
24
|
+
'minify:csr': 'vitrify minify ./dist/csr',
|
25
|
+
'minify:ssr': 'vitrify minify ./dist/ssr',
|
26
|
+
'minify:ssg': 'vitrify minify ./dist/static',
|
24
27
|
test: 'vitrify test',
|
25
28
|
lint: 'eslint --ext .vue --ext .ts src',
|
26
29
|
'lint:fix': 'eslint --ext .vue --ext .ts src --fix',
|
@@ -29,39 +32,34 @@ export const templates = {
|
|
29
32
|
},
|
30
33
|
dependencies: await getLatestVersions([
|
31
34
|
'@fastify/middie',
|
32
|
-
'@fastify/static'
|
33
|
-
'@quasar/extras',
|
34
|
-
'quasar',
|
35
|
-
'vite-plugin-pwa',
|
36
|
-
'vue',
|
37
|
-
'vue-router'
|
35
|
+
'@fastify/static'
|
38
36
|
]),
|
39
37
|
devDependencies: await getLatestVersions([
|
40
|
-
'@vitejs/plugin-vue',
|
41
38
|
'@typescript-eslint/eslint-plugin',
|
42
39
|
'@typescript-eslint/parser',
|
43
40
|
'@types/node',
|
41
|
+
'@vitejs/plugin-vue',
|
44
42
|
'@vue/reactivity',
|
45
43
|
'@vue/runtime-core',
|
46
44
|
'@vue/runtime-dom',
|
47
45
|
'@vue/server-renderer',
|
48
46
|
'@vue/shared',
|
49
|
-
'@unocss/reset',
|
50
|
-
'animated-unocss',
|
51
47
|
'beasties',
|
48
|
+
'devcert',
|
52
49
|
'eslint',
|
53
50
|
'eslint-config-prettier',
|
54
51
|
'eslint-plugin-prettier',
|
55
52
|
'eslint-plugin-vue',
|
56
|
-
'vue-eslint-parser',
|
57
|
-
'typescript-eslint',
|
58
|
-
'devcert',
|
59
53
|
'fastify',
|
60
54
|
'npm-run-all',
|
61
55
|
'typescript',
|
62
|
-
'
|
56
|
+
'typescript-eslint',
|
63
57
|
'vite',
|
58
|
+
'vite-plugin-pwa',
|
64
59
|
'vitrify',
|
60
|
+
'vue',
|
61
|
+
'vue-eslint-parser',
|
62
|
+
'vue-router',
|
65
63
|
'workbox-window'
|
66
64
|
]),
|
67
65
|
exports: {
|
@@ -91,66 +89,294 @@ export const templates = {
|
|
91
89
|
]
|
92
90
|
}
|
93
91
|
},
|
94
|
-
|
95
|
-
name: '
|
96
|
-
fullName: '
|
97
|
-
description: '
|
98
|
-
url: new URL('../templates/
|
92
|
+
quasar: {
|
93
|
+
name: 'quasar',
|
94
|
+
fullName: 'Quasar Project',
|
95
|
+
description: 'Quasar Framework project',
|
96
|
+
url: new URL('../templates/quasar/', import.meta.url),
|
99
97
|
pkgJson: {
|
98
|
+
scripts: {
|
99
|
+
dev: 'vitrify dev',
|
100
|
+
'dev:ssr': 'vitrify dev -m ssr',
|
101
|
+
build: 'run-s build:csr',
|
102
|
+
'build:csr': 'vitrify build',
|
103
|
+
'build:ssr': 'vitrify build -m ssr',
|
104
|
+
'build:ssg': 'vitrify build -m ssg',
|
105
|
+
'minify:csr': 'vitrify minify ./dist/csr',
|
106
|
+
'minify:ssr': 'vitrify minify ./dist/ssr',
|
107
|
+
'minify:ssg': 'vitrify minify ./dist/static',
|
108
|
+
test: 'vitrify test',
|
109
|
+
lint: 'eslint --ext .vue --ext .ts src',
|
110
|
+
'lint:fix': 'eslint --ext .vue --ext .ts src --fix',
|
111
|
+
'format:check': 'prettier --check .',
|
112
|
+
'format:write': 'prettier --write .'
|
113
|
+
},
|
114
|
+
dependencies: await getLatestVersions([
|
115
|
+
'@fastify/middie',
|
116
|
+
'@fastify/static'
|
117
|
+
]),
|
118
|
+
devDependencies: await getLatestVersions([
|
119
|
+
'@quasar/extras',
|
120
|
+
'@typescript-eslint/eslint-plugin',
|
121
|
+
'@typescript-eslint/parser',
|
122
|
+
'@types/node',
|
123
|
+
'@vitejs/plugin-vue',
|
124
|
+
'@vue/reactivity',
|
125
|
+
'@vue/runtime-core',
|
126
|
+
'@vue/runtime-dom',
|
127
|
+
'@vue/server-renderer',
|
128
|
+
'@vue/shared',
|
129
|
+
'beasties',
|
130
|
+
'devcert',
|
131
|
+
'eslint',
|
132
|
+
'eslint-config-prettier',
|
133
|
+
'eslint-plugin-prettier',
|
134
|
+
'eslint-plugin-vue',
|
135
|
+
'fastify',
|
136
|
+
'npm-run-all',
|
137
|
+
'quasar',
|
138
|
+
'typescript',
|
139
|
+
'typescript-eslint',
|
140
|
+
'unocss-preset-quasar',
|
141
|
+
'vite',
|
142
|
+
'vite-plugin-pwa',
|
143
|
+
'vitrify',
|
144
|
+
'vue',
|
145
|
+
'vue-eslint-parser',
|
146
|
+
'vue-router',
|
147
|
+
'workbox-window'
|
148
|
+
]),
|
100
149
|
exports: {
|
101
150
|
'.': {
|
102
151
|
types: './dist/types/index.d.ts',
|
103
|
-
import: './dist/index.js'
|
104
|
-
src: './src/ui/index.ts'
|
152
|
+
import: './dist/index.js'
|
105
153
|
},
|
106
|
-
'./
|
107
|
-
import: './dist/
|
154
|
+
'./fastify-ssr-plugin': {
|
155
|
+
import: './dist/ssr/server/fastify-ssr-plugin.mjs'
|
108
156
|
},
|
109
|
-
'./
|
110
|
-
|
111
|
-
import: './dist/vite-plugin.js',
|
112
|
-
src: './src/vite-plugin.ts'
|
157
|
+
'./hooks': {
|
158
|
+
import: './dist/ssr/server/virtual_vitrify-hooks.mjs'
|
113
159
|
}
|
160
|
+
}
|
161
|
+
},
|
162
|
+
tsconfigJson: {
|
163
|
+
paths: {
|
164
|
+
src: ['./src']
|
114
165
|
},
|
166
|
+
types: ['vite/client', 'vitrify/client'],
|
167
|
+
include: [
|
168
|
+
'vitrify.config.ts',
|
169
|
+
'src/**/*.ts',
|
170
|
+
'src/**/*.d.ts',
|
171
|
+
'src/**/*.tsx',
|
172
|
+
'src/**/*.vue'
|
173
|
+
]
|
174
|
+
}
|
175
|
+
},
|
176
|
+
quasarmd3: {
|
177
|
+
name: 'quasarmd3',
|
178
|
+
fullName: 'Quasar MD3 (alpha)',
|
179
|
+
description: 'Quasar Framework Material Design 3 project',
|
180
|
+
url: new URL('../templates/quasarmd3/', import.meta.url),
|
181
|
+
pkgJson: {
|
115
182
|
scripts: {
|
116
|
-
|
117
|
-
'
|
118
|
-
|
119
|
-
'
|
120
|
-
|
121
|
-
build: '
|
183
|
+
dev: 'vitrify dev',
|
184
|
+
'dev:ssr': 'vitrify dev -m ssr',
|
185
|
+
build: 'run-s build:csr',
|
186
|
+
'build:csr': 'vitrify build',
|
187
|
+
'build:ssr': 'vitrify build -m ssr',
|
188
|
+
'build:ssg': 'vitrify build -m ssg',
|
189
|
+
'minify:csr': 'vitrify minify ./dist/csr',
|
190
|
+
'minify:ssr': 'vitrify minify ./dist/ssr',
|
191
|
+
'minify:ssg': 'vitrify minify ./dist/static',
|
192
|
+
test: 'vitrify test',
|
122
193
|
lint: 'eslint --ext .vue --ext .ts src',
|
123
194
|
'lint:fix': 'eslint --ext .vue --ext .ts src --fix',
|
124
195
|
'format:check': 'prettier --check .',
|
125
196
|
'format:write': 'prettier --write .'
|
126
197
|
},
|
127
|
-
dependencies: await getLatestVersions([
|
198
|
+
dependencies: await getLatestVersions([
|
199
|
+
'@fastify/middie',
|
200
|
+
'@fastify/static'
|
201
|
+
]),
|
128
202
|
devDependencies: await getLatestVersions([
|
203
|
+
'@iconify-json/mdi',
|
204
|
+
'@quasar/extras',
|
205
|
+
'@simsustech/quasar-components',
|
206
|
+
'@typescript-eslint/eslint-plugin',
|
207
|
+
'@typescript-eslint/parser',
|
129
208
|
'@types/node',
|
130
|
-
'@types/ws',
|
131
209
|
'@vitejs/plugin-vue',
|
210
|
+
'@vue/reactivity',
|
211
|
+
'@vue/runtime-core',
|
212
|
+
'@vue/runtime-dom',
|
132
213
|
'@vue/server-renderer',
|
133
|
-
'@
|
134
|
-
'
|
214
|
+
'@vue/shared',
|
215
|
+
'beasties',
|
216
|
+
'devcert',
|
135
217
|
'eslint',
|
136
218
|
'eslint-config-prettier',
|
137
|
-
'eslint-plugin-prettier
|
219
|
+
'eslint-plugin-prettier',
|
138
220
|
'eslint-plugin-vue',
|
221
|
+
'fastify',
|
139
222
|
'npm-run-all',
|
140
223
|
'quasar',
|
141
224
|
'typescript',
|
142
|
-
'
|
225
|
+
'typescript-eslint',
|
226
|
+
'unocss-preset-quasar',
|
143
227
|
'vite',
|
228
|
+
'vite-plugin-pwa',
|
144
229
|
'vitrify',
|
145
230
|
'vue',
|
231
|
+
'vue-eslint-parser',
|
146
232
|
'vue-router',
|
147
|
-
'
|
148
|
-
])
|
233
|
+
'workbox-window'
|
234
|
+
]),
|
235
|
+
exports: {
|
236
|
+
'.': {
|
237
|
+
types: './dist/types/index.d.ts',
|
238
|
+
import: './dist/index.js'
|
239
|
+
},
|
240
|
+
'./fastify-ssr-plugin': {
|
241
|
+
import: './dist/ssr/server/fastify-ssr-plugin.mjs'
|
242
|
+
},
|
243
|
+
'./hooks': {
|
244
|
+
import: './dist/ssr/server/virtual_vitrify-hooks.mjs'
|
245
|
+
}
|
246
|
+
}
|
149
247
|
},
|
150
248
|
tsconfigJson: {
|
151
|
-
|
249
|
+
paths: {
|
250
|
+
src: ['./src']
|
251
|
+
},
|
252
|
+
types: ['vite/client', 'vitrify/client'],
|
253
|
+
include: [
|
254
|
+
'vitrify.config.ts',
|
255
|
+
'src/**/*.ts',
|
256
|
+
'src/**/*.d.ts',
|
257
|
+
'src/**/*.tsx',
|
258
|
+
'src/**/*.vue'
|
259
|
+
]
|
260
|
+
}
|
261
|
+
},
|
262
|
+
fastify: {
|
263
|
+
name: 'fastify',
|
264
|
+
fullName: 'Fastify server',
|
265
|
+
description: 'Fastify server with HMR',
|
266
|
+
url: new URL('../templates/fastify/', import.meta.url),
|
267
|
+
pkgJson: {
|
268
|
+
scripts: {
|
269
|
+
dev: 'vitrify dev -m fastify',
|
270
|
+
'dev:ssr': 'vitrify dev -m fastify',
|
271
|
+
build: 'vitrify build -m fastify',
|
272
|
+
minify: 'vitrify minify ./dist/server',
|
273
|
+
test: 'vitrify test',
|
274
|
+
lint: 'eslint --ext .vue --ext .ts src',
|
275
|
+
'lint:fix': 'eslint --ext .vue --ext .ts src --fix',
|
276
|
+
'format:check': 'prettier --check .',
|
277
|
+
'format:write': 'prettier --write .'
|
278
|
+
},
|
279
|
+
dependencies: await getLatestVersions([
|
280
|
+
'@fastify/middie',
|
281
|
+
'@fastify/static'
|
282
|
+
]),
|
283
|
+
devDependencies: await getLatestVersions([
|
284
|
+
'@typescript-eslint/eslint-plugin',
|
285
|
+
'@typescript-eslint/parser',
|
286
|
+
'@types/node',
|
287
|
+
'devcert',
|
288
|
+
'eslint',
|
289
|
+
'eslint-config-prettier',
|
290
|
+
'eslint-plugin-prettier',
|
291
|
+
'eslint-plugin-vue',
|
292
|
+
'fastify',
|
293
|
+
'npm-run-all',
|
294
|
+
'typescript',
|
295
|
+
'typescript-eslint',
|
296
|
+
'vite',
|
297
|
+
'vitrify'
|
298
|
+
]),
|
299
|
+
exports: {
|
300
|
+
'.': {
|
301
|
+
types: './dist/types/index.d.ts',
|
302
|
+
import: './dist/index.js'
|
303
|
+
}
|
304
|
+
}
|
305
|
+
},
|
306
|
+
tsconfigJson: {
|
307
|
+
paths: {
|
308
|
+
src: ['./src']
|
309
|
+
},
|
310
|
+
types: ['vite/client', 'vitrify/client'],
|
311
|
+
include: [
|
312
|
+
'vitrify.config.ts',
|
313
|
+
'src/**/*.ts',
|
314
|
+
'src/**/*.d.ts',
|
315
|
+
'src/**/*.tsx',
|
316
|
+
'src/**/*.vue'
|
317
|
+
]
|
152
318
|
}
|
153
319
|
}
|
320
|
+
// uiPlugin: {
|
321
|
+
// name: 'vite-ui-plugin',
|
322
|
+
// fullName: 'Vite UI plugin',
|
323
|
+
// description: 'A Vite plugin for UI components',
|
324
|
+
// url: new URL('../templates/vite-ui-plugin/', import.meta.url),
|
325
|
+
// pkgJson: {
|
326
|
+
// exports: {
|
327
|
+
// '.': {
|
328
|
+
// types: './dist/types/index.d.ts',
|
329
|
+
// import: './dist/index.js',
|
330
|
+
// src: './src/ui/index.ts'
|
331
|
+
// },
|
332
|
+
// './css': {
|
333
|
+
// import: './dist/style.css'
|
334
|
+
// },
|
335
|
+
// './vite-plugin': {
|
336
|
+
// types: './dist/vite-plugin.d.ts',
|
337
|
+
// import: './dist/vite-plugin.js',
|
338
|
+
// src: './src/vite-plugin.ts'
|
339
|
+
// }
|
340
|
+
// },
|
341
|
+
// scripts: {
|
342
|
+
// 'build:plugin': 'vite build',
|
343
|
+
// 'build:vite-plugin': 'tsc -p tsconfig.build.plugin.json',
|
344
|
+
// 'generate:types': 'vue-tsc -p tsconfig.types.json',
|
345
|
+
// 'clean:buildinfo': 'rimraf tsconfig.build.plugin.tsbuildinfo',
|
346
|
+
// clean: 'run-s clean:buildinfo',
|
347
|
+
// build: 'run-s clean build:plugin build:vite-plugin generate:types',
|
348
|
+
// lint: 'eslint --ext .vue --ext .ts src',
|
349
|
+
// 'lint:fix': 'eslint --ext .vue --ext .ts src --fix',
|
350
|
+
// 'format:check': 'prettier --check .',
|
351
|
+
// 'format:write': 'prettier --write .'
|
352
|
+
// },
|
353
|
+
// dependencies: await getLatestVersions(['unplugin-vue-components']),
|
354
|
+
// devDependencies: await getLatestVersions([
|
355
|
+
// '@types/node',
|
356
|
+
// '@types/ws',
|
357
|
+
// '@vitejs/plugin-vue',
|
358
|
+
// '@vue/server-renderer',
|
359
|
+
// '@typescript-eslint/eslint-plugin',
|
360
|
+
// '@typescript-eslint/parser',
|
361
|
+
// 'eslint',
|
362
|
+
// 'eslint-config-prettier',
|
363
|
+
// 'eslint-plugin-prettier-vue',
|
364
|
+
// 'eslint-plugin-vue',
|
365
|
+
// 'npm-run-all',
|
366
|
+
// 'quasar',
|
367
|
+
// 'typescript',
|
368
|
+
// 'rimraf',
|
369
|
+
// 'vite',
|
370
|
+
// 'vitrify',
|
371
|
+
// 'vue',
|
372
|
+
// 'vue-router',
|
373
|
+
// 'vue-tsc'
|
374
|
+
// ])
|
375
|
+
// },
|
376
|
+
// tsconfigJson: {
|
377
|
+
// types: ['vite/client']
|
378
|
+
// }
|
379
|
+
// }
|
154
380
|
// plugin: {
|
155
381
|
// name: 'quasar-plugin',
|
156
382
|
// fullName: 'Quasar Plugin',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-vitrify",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.7.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Stefan van Herwijnen",
|
6
6
|
"type": "module",
|
@@ -21,17 +21,17 @@
|
|
21
21
|
},
|
22
22
|
"homepage": "https://github.com/simsustech/vitrify/tree/main/packages/create-vitrify#readme",
|
23
23
|
"dependencies": {
|
24
|
-
"@vitrify/tools": "^0.4.0",
|
25
24
|
"handlebars": "^4.7.8",
|
26
|
-
"@inquirer/prompts": "^7.
|
25
|
+
"@inquirer/prompts": "^7.5.0",
|
27
26
|
"latest-version": "^9.0.0",
|
28
|
-
"minimist": "^1.2.8"
|
27
|
+
"minimist": "^1.2.8",
|
28
|
+
"@vitrify/tools": "0.4.1"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"@types/minimist": "^1.2.5",
|
32
|
-
"@types/node": "^22.
|
33
|
-
"typescript": "^5.
|
34
|
-
"vite": "^6.
|
32
|
+
"@types/node": "^22.15.3",
|
33
|
+
"typescript": "^5.8.3",
|
34
|
+
"vite": "^6.3.4",
|
35
35
|
"vue": "^3.5.13"
|
36
36
|
},
|
37
37
|
"files": [
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"semi": false,
|
3
|
+
"tabWidth": 2,
|
4
|
+
"singleQuote": true,
|
5
|
+
"printWidth": 80,
|
6
|
+
"trailingComma": "none",
|
7
|
+
"overrides": [
|
8
|
+
{
|
9
|
+
"files": ["*.json5"],
|
10
|
+
"options": {
|
11
|
+
"singleQuote": false,
|
12
|
+
"quoteProps": "preserve"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"files": ["*.yml"],
|
17
|
+
"options": {
|
18
|
+
"singleQuote": false
|
19
|
+
}
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
2
|
+
import pluginVue from 'eslint-plugin-vue'
|
3
|
+
import typescriptEslint from 'typescript-eslint'
|
4
|
+
import vueParser from 'vue-eslint-parser'
|
5
|
+
|
6
|
+
export default typescriptEslint.config(
|
7
|
+
...typescriptEslint.configs.recommended,
|
8
|
+
...pluginVue.configs['flat/recommended'],
|
9
|
+
|
10
|
+
{
|
11
|
+
files: ['**/*.vue'],
|
12
|
+
languageOptions: {
|
13
|
+
parser: vueParser,
|
14
|
+
parserOptions: {
|
15
|
+
sourceType: 'module',
|
16
|
+
parser: {
|
17
|
+
ts: typescriptEslint.parser
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
},
|
22
|
+
|
23
|
+
/**
|
24
|
+
* end
|
25
|
+
*/
|
26
|
+
eslintPluginPrettierRecommended
|
27
|
+
)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { FastifyInstance } from 'fastify'
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Only used in SSR/SSG
|
5
|
+
*/
|
6
|
+
export default async function (fastify: FastifyInstance) {
|
7
|
+
console.log('Running setup function....')
|
8
|
+
|
9
|
+
fastify.get('/', (request, reply) => {
|
10
|
+
reply.send('Hello world!')
|
11
|
+
})
|
12
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { VitrifyConfig } from 'vitrify'
|
2
|
+
import { certificateFor } from 'devcert'
|
3
|
+
|
4
|
+
export default async function ({ mode, command }): Promise<VitrifyConfig> {
|
5
|
+
const config: VitrifyConfig = {
|
6
|
+
vitrify: {
|
7
|
+
hooks: {
|
8
|
+
onSetup: [new URL('src/setup.ts', import.meta.url)]
|
9
|
+
},
|
10
|
+
ssr: {
|
11
|
+
serverModules: []
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
if (mode === 'development') {
|
16
|
+
config.server = {
|
17
|
+
https: await certificateFor('vitrify.test')
|
18
|
+
}
|
19
|
+
}
|
20
|
+
return config
|
21
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
|
2
|
+
import pluginVue from 'eslint-plugin-vue'
|
3
|
+
import typescriptEslint from 'typescript-eslint'
|
4
|
+
import vueParser from 'vue-eslint-parser'
|
5
|
+
|
6
|
+
export default typescriptEslint.config(
|
7
|
+
...typescriptEslint.configs.recommended,
|
8
|
+
...pluginVue.configs['flat/recommended'],
|
9
|
+
|
10
|
+
{
|
11
|
+
files: ['**/*.vue'],
|
12
|
+
languageOptions: {
|
13
|
+
parser: vueParser,
|
14
|
+
parserOptions: {
|
15
|
+
sourceType: 'module',
|
16
|
+
parser: {
|
17
|
+
ts: typescriptEslint.parser
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
},
|
22
|
+
|
23
|
+
/**
|
24
|
+
* end
|
25
|
+
*/
|
26
|
+
eslintPluginPrettierRecommended
|
27
|
+
)
|
@@ -3,8 +3,8 @@ import { RouteRecordRaw } from 'vue-router'
|
|
3
3
|
const routes: RouteRecordRaw[] = [
|
4
4
|
{
|
5
5
|
path: '/',
|
6
|
-
component: () => import('
|
7
|
-
children: [{ path: '', component: () => import('
|
6
|
+
component: () => import('../layouts/MainLayout.vue'),
|
7
|
+
children: [{ path: '', component: () => import('../pages/IndexPage.vue') }]
|
8
8
|
},
|
9
9
|
|
10
10
|
// Always leave this as last one,
|
@@ -12,7 +12,7 @@ const routes: RouteRecordRaw[] = [
|
|
12
12
|
{
|
13
13
|
path: '/404',
|
14
14
|
alias: '/:catchAll(.*)*',
|
15
|
-
component: () => import('
|
15
|
+
component: () => import('../pages/Error404Page.vue')
|
16
16
|
}
|
17
17
|
]
|
18
18
|
|
@@ -4,5 +4,6 @@ import type { FastifyInstance } from 'fastify'
|
|
4
4
|
* Only used in SSR/SSG
|
5
5
|
*/
|
6
6
|
export default async function (fastify: FastifyInstance) {
|
7
|
-
|
7
|
+
fastify.log('Running setup function...')
|
8
|
+
console.log('Running setup function...')
|
8
9
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { VitrifyConfig } from 'vitrify'
|
2
2
|
import { certificateFor } from 'devcert'
|
3
|
-
import {
|
3
|
+
import { QuasarPlugin, type QuasarPluginOptions } from 'vitrify/plugins'
|
4
4
|
|
5
|
-
const quasarConf:
|
5
|
+
const quasarConf: QuasarPluginOptions = {
|
6
6
|
// extras: ['material-icons'],
|
7
7
|
framework: {
|
8
8
|
components: [
|
@@ -20,19 +20,15 @@ const quasarConf: QuasarConf = {
|
|
20
20
|
export default async function ({ mode, command }): Promise<VitrifyConfig> {
|
21
21
|
const config: VitrifyConfig = {
|
22
22
|
vitrify: {
|
23
|
+
plugins: [
|
24
|
+
{
|
25
|
+
plugin: QuasarPlugin,
|
26
|
+
options: quasarConf
|
27
|
+
}
|
28
|
+
],
|
23
29
|
hooks: {
|
24
30
|
onSetup: [new URL('src/setup.ts', import.meta.url)]
|
25
31
|
},
|
26
|
-
/*
|
27
|
-
* Experimental
|
28
|
-
*/
|
29
|
-
// unocss: {
|
30
|
-
// presets: [
|
31
|
-
// QuasarPreset({
|
32
|
-
// plugins: quasarConf['framework']['plugins']
|
33
|
-
// })
|
34
|
-
// ]
|
35
|
-
// },
|
36
32
|
sass: {
|
37
33
|
variables: {
|
38
34
|
$primary: '#000000'
|
@@ -41,8 +37,7 @@ export default async function ({ mode, command }): Promise<VitrifyConfig> {
|
|
41
37
|
ssr: {
|
42
38
|
serverModules: []
|
43
39
|
}
|
44
|
-
}
|
45
|
-
quasar: quasarConf
|
40
|
+
}
|
46
41
|
}
|
47
42
|
if (mode === 'development') {
|
48
43
|
config.server = {
|