create-vitrify 0.4.3 → 0.4.5

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 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vitrify",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "license": "MIT",
5
5
  "author": "Stefan van Herwijnen",
6
6
  "type": "module",
@@ -25,19 +25,19 @@
25
25
  },
26
26
  "homepage": "https://github.com/simsustech/vitrify/tree/main/packages/create-vitrify#readme",
27
27
  "dependencies": {
28
- "@vitrify/tools": "^0.1.0",
29
- "handlebars": "^4.7.7",
30
- "inquirer": "^8.2.2",
31
- "latest-version": "^7.0.0",
32
- "minimist": "^1.2.6"
28
+ "@vitrify/tools": "^0.1.6",
29
+ "handlebars": "^4.7.8",
30
+ "inquirer": "^9.2.14",
31
+ "latest-version": "^8.0.0",
32
+ "minimist": "^1.2.8"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/inquirer": "^8.2.1",
36
- "@types/minimist": "^1.2.2",
37
- "@types/node": "^17.0.23",
38
- "typescript": "^4.7.3",
39
- "vite": "^4.0.1",
40
- "vue": "^3.2.37"
35
+ "@types/inquirer": "^9.0.7",
36
+ "@types/minimist": "^1.2.5",
37
+ "@types/node": "^20.11.19",
38
+ "typescript": "^5.3.3",
39
+ "vite": "^5.1.3",
40
+ "vue": "^3.4.19"
41
41
  },
42
42
  "files": [
43
43
  "dist",
@@ -3,7 +3,7 @@
3
3
  "target": "esnext",
4
4
  "useDefineForClassFields": true,
5
5
  "module": "esnext",
6
- "moduleResolution": "node",
6
+ "moduleResolution": "Bundler",
7
7
  "strict": true,
8
8
  "jsx": "preserve",
9
9
  "sourceMap": true,
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "composite": true,
4
4
  "module": "esnext",
5
- "moduleResolution": "node",
5
+ "moduleResolution": "Bundler",
6
6
  "outDir": "./dist",
7
7
  "declaration": true
8
8
  },
@@ -5,7 +5,7 @@
5
5
  "lib": ["esnext", "DOM"],
6
6
  "strict": true,
7
7
  "skipLibCheck": true,
8
- "moduleResolution": "node",
8
+ "moduleResolution": "Bundler",
9
9
  "declaration": true,
10
10
  "outDir": "dist",
11
11
  "emitDeclarationOnly": true,
@@ -1,9 +1 @@
1
- import * as VuePlugin from './vue-plugin'
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: name + key.slice(1),
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: 'ui',
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
- * For building subpath exports
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 }