create-vitrify 0.4.2 → 0.4.4
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/cli.js +1 -0
- package/dist/templates.js +12 -1
- package/dist/types/cli.d.ts +1 -0
- package/package.json +3 -3
- package/templates/quasar-plugin/tsconfig.json +1 -1
- package/templates/quasar-plugin/tsconfig.node.json +1 -1
- package/templates/quasar-plugin/tsconfig.types.json +1 -1
- package/templates/vite-ui-plugin/src/ui/index.ts +1 -9
- package/templates/vite-ui-plugin/src/vite-plugin.ts +9 -6
- package/templates/vite-ui-plugin/vite.config.ts +5 -12
- package/templates/vite-ui-plugin/src/ui/vue-plugin.ts +0 -15
package/dist/cli.js
CHANGED
package/dist/templates.js
CHANGED
@@ -32,6 +32,7 @@ export const templates = {
|
|
32
32
|
'@fastify/static',
|
33
33
|
'@quasar/extras',
|
34
34
|
'quasar',
|
35
|
+
'vite-plugin-pwa',
|
35
36
|
'vue',
|
36
37
|
'vue-router'
|
37
38
|
]),
|
@@ -39,6 +40,12 @@ export const templates = {
|
|
39
40
|
'@vitejs/plugin-vue',
|
40
41
|
'@typescript-eslint/eslint-plugin',
|
41
42
|
'@typescript-eslint/parser',
|
43
|
+
'@types/node',
|
44
|
+
'@vue/reactivity',
|
45
|
+
'@vue/runtime-core',
|
46
|
+
'@vue/runtime-dom',
|
47
|
+
'@vue/server-renderer',
|
48
|
+
'@vue/shared',
|
42
49
|
'critters',
|
43
50
|
'eslint',
|
44
51
|
'eslint-config-prettier',
|
@@ -49,7 +56,8 @@ export const templates = {
|
|
49
56
|
'npm-run-all',
|
50
57
|
'typescript',
|
51
58
|
'vite',
|
52
|
-
'vitrify'
|
59
|
+
'vitrify',
|
60
|
+
'workbox-window'
|
53
61
|
]),
|
54
62
|
exports: {
|
55
63
|
'.': {
|
@@ -90,6 +98,9 @@ export const templates = {
|
|
90
98
|
import: './dist/index.js',
|
91
99
|
src: './src/ui/index.ts'
|
92
100
|
},
|
101
|
+
'./css': {
|
102
|
+
import: './dist/style.css'
|
103
|
+
},
|
93
104
|
'./vite-plugin': {
|
94
105
|
types: './dist/vite-plugin.d.ts',
|
95
106
|
import: './dist/vite-plugin.js',
|
package/dist/types/cli.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-vitrify",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.4",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "Stefan van Herwijnen",
|
6
6
|
"type": "module",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
},
|
26
26
|
"homepage": "https://github.com/simsustech/vitrify/tree/main/packages/create-vitrify#readme",
|
27
27
|
"dependencies": {
|
28
|
-
"@vitrify/tools": "^0.1.
|
28
|
+
"@vitrify/tools": "^0.1.5",
|
29
29
|
"handlebars": "^4.7.7",
|
30
30
|
"inquirer": "^8.2.2",
|
31
31
|
"latest-version": "^7.0.0",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"@types/minimist": "^1.2.2",
|
37
37
|
"@types/node": "^17.0.23",
|
38
38
|
"typescript": "^4.7.3",
|
39
|
-
"vite": "^
|
39
|
+
"vite": "^4.0.1",
|
40
40
|
"vue": "^3.2.37"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -1,9 +1 @@
|
|
1
|
-
|
2
|
-
import HelloWorld from './components/HelloWorld.vue'
|
3
|
-
|
4
|
-
// export * from './utils/helpers'
|
5
|
-
export * from './lang'
|
6
|
-
export * from './icon-set'
|
7
|
-
export { HelloWorld }
|
8
|
-
|
9
|
-
export default VuePlugin
|
1
|
+
export { default as HelloWorld } from './components/HelloWorld.vue'
|
@@ -28,17 +28,20 @@ export default async function ({
|
|
28
28
|
config(config, { mode }) {
|
29
29
|
if (mode === 'development' || buildFromSrc) {
|
30
30
|
const alias = Object.entries(exports)
|
31
|
+
.filter(([key, val]) => {
|
32
|
+
return val.src
|
33
|
+
})
|
31
34
|
.map(([key, val]) => {
|
32
35
|
return {
|
33
|
-
find:
|
36
|
+
find: new RegExp(
|
37
|
+
`^${
|
38
|
+
name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + key.slice(1)
|
39
|
+
}$`
|
40
|
+
),
|
41
|
+
// name: name + key.slice(1),
|
34
42
|
replacement: new URL('.' + val.src, import.meta.url).pathname
|
35
43
|
}
|
36
44
|
})
|
37
|
-
.sort(
|
38
|
-
(a, b) =>
|
39
|
-
(b.find.match(/\//g) || []).length -
|
40
|
-
(a.find.match(/\//g) || []).length
|
41
|
-
)
|
42
45
|
|
43
46
|
return {
|
44
47
|
resolve: {
|
@@ -13,24 +13,17 @@ export default defineConfig(async ({ command, mode }) => ({
|
|
13
13
|
build: {
|
14
14
|
// minify: false,
|
15
15
|
lib: {
|
16
|
-
fileName:
|
16
|
+
fileName: (format, entryName) => {
|
17
|
+
return entryName + '.js'
|
18
|
+
},
|
17
19
|
formats: ['es'],
|
18
20
|
entry: './src/ui/index.ts'
|
19
21
|
},
|
20
22
|
minify: false,
|
21
23
|
emptyOutDir: true,
|
22
24
|
rollupOptions: {
|
23
|
-
|
24
|
-
|
25
|
-
*/
|
26
|
-
// input: {
|
27
|
-
// subodule: new URL(
|
28
|
-
// './src/ui/submodule/index.ts',
|
29
|
-
// import.meta.url
|
30
|
-
// ).pathname
|
31
|
-
// },
|
32
|
-
output: {
|
33
|
-
entryFileNames: '[name].js'
|
25
|
+
input: {
|
26
|
+
ui: new URL('./src/ui/index.ts', import.meta.url).pathname
|
34
27
|
},
|
35
28
|
/**
|
36
29
|
* Add (UI) frameworks that are used
|
@@ -1,15 +0,0 @@
|
|
1
|
-
const components = import.meta.glob('./components/*.vue')
|
2
|
-
|
3
|
-
import { loadLang } from './lang'
|
4
|
-
|
5
|
-
function install(app: any, options: { lang: string }) {
|
6
|
-
loadLang(options?.lang || 'en-us')
|
7
|
-
for (const path in components) {
|
8
|
-
components[path]().then((mod) => {
|
9
|
-
// @ts-ignore
|
10
|
-
app.component(mod.name, mod)
|
11
|
-
})
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
export { install }
|