create-vitrify 0.6.4 → 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
@@ -0,0 +1,204 @@
|
|
1
|
+
import type { VitrifyConfig } from 'vitrify'
|
2
|
+
import { QuasarPlugin, type QuasarPluginOptions } from 'vitrify/plugins'
|
3
|
+
import { certificateFor } from 'devcert'
|
4
|
+
import QuasarComponentsPlugin from '@simsustech/quasar-components/vite-plugin'
|
5
|
+
import { QuasarPreset } from 'unocss-preset-quasar'
|
6
|
+
import { MaterialDesign3 } from 'unocss-preset-quasar/styles'
|
7
|
+
import { loadEnv } from 'vite'
|
8
|
+
|
9
|
+
const iconifyJsonIconSet = {
|
10
|
+
name: 'iconify-json-mdi',
|
11
|
+
type: {
|
12
|
+
positive: 'i-mdi-check-circle',
|
13
|
+
negative: 'i-mdi-alert',
|
14
|
+
info: 'i-mdi-information',
|
15
|
+
warning: 'i-mdi-exclamation'
|
16
|
+
},
|
17
|
+
arrow: {
|
18
|
+
up: 'i-mdi-arrow-up',
|
19
|
+
right: 'i-mdi-arrow-right',
|
20
|
+
down: 'i-mdi-arrow-down',
|
21
|
+
left: 'i-mdi-arrow-left',
|
22
|
+
dropdown: 'i-mdi-menu-down'
|
23
|
+
},
|
24
|
+
chevron: {
|
25
|
+
left: 'i-mdi-chevron-left',
|
26
|
+
right: 'i-mdi-chevron-right'
|
27
|
+
},
|
28
|
+
colorPicker: {
|
29
|
+
spectrum: 'i-mdi-gradient-vertical',
|
30
|
+
tune: 'i-mdi-tune',
|
31
|
+
palette: 'i-mdi-palette-swatch'
|
32
|
+
},
|
33
|
+
pullToRefresh: {
|
34
|
+
icon: 'i-mdi-refresh'
|
35
|
+
},
|
36
|
+
carousel: {
|
37
|
+
left: 'i-mdi-chevron-left',
|
38
|
+
right: 'i-mdi-chevron-right',
|
39
|
+
up: 'i-mdi-chevron-up',
|
40
|
+
down: 'i-mdi-chevron-down',
|
41
|
+
navigationIcon: 'i-mdi-circle'
|
42
|
+
},
|
43
|
+
chip: {
|
44
|
+
remove: 'i-mdi-close-circle',
|
45
|
+
selected: 'i-mdi-check'
|
46
|
+
},
|
47
|
+
datetime: {
|
48
|
+
arrowLeft: 'i-mdi-chevron-left',
|
49
|
+
arrowRight: 'i-mdi-chevron-right',
|
50
|
+
now: 'i-mdi-clock-outline',
|
51
|
+
today: 'i-mdi-calendar-today'
|
52
|
+
},
|
53
|
+
editor: {
|
54
|
+
bold: 'i-mdi-format-bold',
|
55
|
+
italic: 'i-mdi-format-italic',
|
56
|
+
strikethrough: 'i-mdi-format-strikethrough-variant',
|
57
|
+
underline: 'i-mdi-format-underline',
|
58
|
+
unorderedList: 'i-mdi-format-list-bulleted',
|
59
|
+
orderedList: 'i-mdi-format-list-numbered',
|
60
|
+
subscript: 'i-mdi-format-subscript',
|
61
|
+
superscript: 'i-mdi-format-superscript',
|
62
|
+
hyperlink: 'i-mdi-link',
|
63
|
+
toggleFullscreen: 'i-mdi-fullscreen',
|
64
|
+
quote: 'i-mdi-format-quote-close',
|
65
|
+
left: 'i-mdi-format-align-left',
|
66
|
+
center: 'i-mdi-format-align-center',
|
67
|
+
right: 'i-mdi-format-align-right',
|
68
|
+
justify: 'i-mdi-format-align-justify',
|
69
|
+
print: 'i-mdi-printer',
|
70
|
+
outdent: 'i-mdi-format-indent-decrease',
|
71
|
+
indent: 'i-mdi-format-indent-increase',
|
72
|
+
removeFormat: 'i-mdi-format-clear',
|
73
|
+
formatting: 'i-mdi-format-color-text',
|
74
|
+
fontSize: 'i-mdi-format-size',
|
75
|
+
align: 'i-mdi-format-align-left',
|
76
|
+
hr: 'i-mdi-minus',
|
77
|
+
undo: 'i-mdi-undo',
|
78
|
+
redo: 'i-mdi-redo',
|
79
|
+
heading: 'i-mdi-format-size',
|
80
|
+
heading1: 'i-mdi-format-header-1',
|
81
|
+
heading2: 'i-mdi-format-header-2',
|
82
|
+
heading3: 'i-mdi-format-header-3',
|
83
|
+
heading4: 'i-mdi-format-header-4',
|
84
|
+
heading5: 'i-mdi-format-header-5',
|
85
|
+
heading6: 'i-mdi-format-header-6',
|
86
|
+
code: 'i-mdi-code-tags',
|
87
|
+
size: 'i-mdi-format-size',
|
88
|
+
size1: 'i-mdi-numeric-1-box',
|
89
|
+
size2: 'i-mdi-numeric-2-box',
|
90
|
+
size3: 'i-mdi-numeric-3-box',
|
91
|
+
size4: 'i-mdi-numeric-4-box',
|
92
|
+
size5: 'i-mdi-numeric-5-box',
|
93
|
+
size6: 'i-mdi-numeric-6-box',
|
94
|
+
size7: 'i-mdi-numeric-7-box',
|
95
|
+
font: 'i-mdi-format-font',
|
96
|
+
viewSource: 'i-mdi-code-tags'
|
97
|
+
},
|
98
|
+
expansionItem: {
|
99
|
+
icon: 'i-mdi-chevron-down',
|
100
|
+
denseIcon: 'i-mdi-menu-down'
|
101
|
+
},
|
102
|
+
fab: {
|
103
|
+
icon: 'i-mdi-plus',
|
104
|
+
activeIcon: 'i-mdi-close'
|
105
|
+
},
|
106
|
+
field: {
|
107
|
+
clear: 'i-mdi-close-circle',
|
108
|
+
error: 'i-mdi-alert-circle'
|
109
|
+
},
|
110
|
+
pagination: {
|
111
|
+
first: 'i-mdi-chevron-double-left',
|
112
|
+
prev: 'i-mdi-chevron-left',
|
113
|
+
next: 'i-mdi-chevron-right',
|
114
|
+
last: 'i-mdi-chevron-double-right'
|
115
|
+
},
|
116
|
+
rating: {
|
117
|
+
icon: 'i-mdi-star'
|
118
|
+
},
|
119
|
+
stepper: {
|
120
|
+
done: 'i-mdi-check',
|
121
|
+
active: 'i-mdi-pencil',
|
122
|
+
error: 'i-mdi-alert'
|
123
|
+
},
|
124
|
+
tabs: {
|
125
|
+
left: 'i-mdi-chevron-left',
|
126
|
+
right: 'i-mdi-chevron-right',
|
127
|
+
up: 'i-mdi-chevron-up',
|
128
|
+
down: 'i-mdi-chevron-down'
|
129
|
+
},
|
130
|
+
table: {
|
131
|
+
arrowUp: 'i-mdi-arrow-up',
|
132
|
+
warning: 'i-mdi-alert',
|
133
|
+
firstPage: 'i-mdi-chevron-double-left',
|
134
|
+
prevPage: 'i-mdi-chevron-left',
|
135
|
+
nextPage: 'i-mdi-chevron-right',
|
136
|
+
lastPage: 'i-mdi-chevron-double-right'
|
137
|
+
},
|
138
|
+
tree: {
|
139
|
+
icon: 'i-mdi-play'
|
140
|
+
},
|
141
|
+
uploader: {
|
142
|
+
done: 'i-mdi-check',
|
143
|
+
clear: 'i-mdi-close',
|
144
|
+
add: 'i-mdi-plus-box',
|
145
|
+
upload: 'i-mdi-cloud-upload',
|
146
|
+
removeQueue: 'i-mdi-notification-clear-all',
|
147
|
+
removeUploaded: 'i-mdi-check-all'
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
const quasarConf: QuasarPluginOptions = {
|
152
|
+
framework: {
|
153
|
+
plugins: ['Dialog', 'Notify', 'Loading', 'Meta'],
|
154
|
+
iconSet: iconifyJsonIconSet
|
155
|
+
},
|
156
|
+
/*
|
157
|
+
* Disable SASS if you use UnoCSS
|
158
|
+
*/
|
159
|
+
disableSass: true
|
160
|
+
}
|
161
|
+
|
162
|
+
export default async function ({ mode, command }): Promise<VitrifyConfig> {
|
163
|
+
const env = loadEnv(mode, process.cwd(), '')
|
164
|
+
const config: VitrifyConfig = {
|
165
|
+
plugins: [QuasarComponentsPlugin()],
|
166
|
+
vitrify: {
|
167
|
+
plugins: [
|
168
|
+
{
|
169
|
+
plugin: QuasarPlugin,
|
170
|
+
options: quasarConf
|
171
|
+
}
|
172
|
+
],
|
173
|
+
lang: env.VITE_LANG,
|
174
|
+
productName: 'Quasar MD3',
|
175
|
+
hooks: {
|
176
|
+
onSetup: []
|
177
|
+
},
|
178
|
+
ssr: {
|
179
|
+
serverModules: []
|
180
|
+
},
|
181
|
+
unocss: {
|
182
|
+
presets: [
|
183
|
+
QuasarPreset({
|
184
|
+
style: MaterialDesign3,
|
185
|
+
sourceColor: env.VITE_SOURCE_COLOR,
|
186
|
+
plugins: quasarConf['framework']['plugins'],
|
187
|
+
iconSet: quasarConf['framework']['iconSet']
|
188
|
+
})
|
189
|
+
],
|
190
|
+
content: {
|
191
|
+
pipeline: {
|
192
|
+
include: [/@simsustech\/quasar-components/]
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
if (mode === 'development') {
|
199
|
+
config.server = {
|
200
|
+
https: await certificateFor('vitrify.local')
|
201
|
+
}
|
202
|
+
}
|
203
|
+
return config
|
204
|
+
}
|
@@ -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,14 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
+
<link rel="icon" href="/favicon.ico" />
|
7
|
+
<title></title>
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
<!-- A body opening and closing tag is sufficient for Vitrify -->
|
12
|
+
<div id="app"></div>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<template>
|
2
|
+
<router-view v-slot="{ Component }">
|
3
|
+
<Suspense>
|
4
|
+
<template #default>
|
5
|
+
<component :is="Component" />
|
6
|
+
</template>
|
7
|
+
<template #fallback>
|
8
|
+
<div>Loading...</div>
|
9
|
+
</template>
|
10
|
+
</Suspense>
|
11
|
+
</router-view>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script lang="ts">
|
15
|
+
export default {
|
16
|
+
name: 'App'
|
17
|
+
}
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<script setup lang="ts"></script>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import {
|
2
|
+
createMemoryHistory,
|
3
|
+
createRouter as _createRouter,
|
4
|
+
createWebHistory
|
5
|
+
} from 'vue-router'
|
6
|
+
import routes from './routes'
|
7
|
+
|
8
|
+
export default function createRouter() {
|
9
|
+
return _createRouter({
|
10
|
+
// use appropriate history implementation for server/client
|
11
|
+
// import.meta.env.SSR is injected by Vite.
|
12
|
+
history: import.meta.env.SSR
|
13
|
+
? createMemoryHistory(__BASE_URL__)
|
14
|
+
: createWebHistory(__BASE_URL__),
|
15
|
+
routes
|
16
|
+
})
|
17
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { RouteRecordRaw } from 'vue-router'
|
2
|
+
|
3
|
+
const routes: RouteRecordRaw[] = [
|
4
|
+
{
|
5
|
+
path: '/',
|
6
|
+
component: () => import('../layouts/MainLayout.vue'),
|
7
|
+
children: [{ path: '', component: () => import('../pages/IndexPage.vue') }]
|
8
|
+
},
|
9
|
+
|
10
|
+
// Always leave this as last one,
|
11
|
+
// but you can also remove it
|
12
|
+
{
|
13
|
+
path: '/404',
|
14
|
+
alias: '/:catchAll(.*)*',
|
15
|
+
component: () => import('../pages/Error404Page.vue')
|
16
|
+
}
|
17
|
+
]
|
18
|
+
|
19
|
+
export default routes
|
@@ -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
|
+
}
|
File without changes
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
ignorePatterns: ['.eslintrc.cjs'],
|
3
|
-
extends: [
|
4
|
-
'eslint:recommended',
|
5
|
-
'plugin:@typescript-eslint/recommended',
|
6
|
-
'plugin:vue/vue3-recommended',
|
7
|
-
'plugin:prettier-vue/recommended'
|
8
|
-
],
|
9
|
-
parser: 'vue-eslint-parser',
|
10
|
-
parserOptions: {
|
11
|
-
parser: '@typescript-eslint/parser',
|
12
|
-
sourceType: 'module'
|
13
|
-
},
|
14
|
-
rules: {
|
15
|
-
'@typescript-eslint/ban-ts-comment': 0
|
16
|
-
},
|
17
|
-
plugins: ['@typescript-eslint'],
|
18
|
-
root: true
|
19
|
-
}
|