@kevinmarrec/create-app 0.1.0 → 0.3.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/index.js CHANGED
@@ -8,7 +8,7 @@ import { x } from "tinyexec";
8
8
  import fs from "node:fs/promises";
9
9
 
10
10
  //#region package.json
11
- var version = "0.1.0";
11
+ var version = "0.3.0";
12
12
 
13
13
  //#endregion
14
14
  //#region src/utils/fs.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kevinmarrec/create-app",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.3.0",
5
5
  "description": "CLI that scaffolds an opinionated Bun & Vue fullstack application.",
6
6
  "author": "Kevin Marrec <kevin@marrec.io>",
7
7
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- /// <reference types="@kevinmarrec/cloudstack-vite-config/client" />
1
+ /// <reference types="vite/client" />
2
2
 
3
3
  interface ImportMetaEnv {
4
4
  readonly VITE_API_URL: string
@@ -9,16 +9,27 @@
9
9
  "preview": "vite preview --open"
10
10
  },
11
11
  "dependencies": {
12
+ "@kevinmarrec/vue-i18n": "^1.0.0",
12
13
  "@orpc/client": "^1.8.5",
13
14
  "@orpc/tanstack-query": "1.6.4",
14
15
  "@tanstack/vue-query": "^5.85.5",
16
+ "@unhead/vue": "^2.0.14",
17
+ "@vueuse/core": "^13.8.0",
15
18
  "unocss": "^66.4.2",
16
19
  "vue": "^3.5.20"
17
20
  },
18
21
  "devDependencies": {
19
- "@kevinmarrec/cloudstack-vite-config": "^1.0.0-rc.15",
20
- "@kevinmarrec/cloudstack-vue": "^1.0.0-rc.15",
21
22
  "@kevinmarrec/unocss-config": "^1.0.0",
22
- "vite": "^7.1.3"
23
+ "@kevinmarrec/vite-plugin-dark-mode": "^1.0.0",
24
+ "@modyfi/vite-plugin-yaml": "^1.1.1",
25
+ "@unhead/addons": "^2.0.14",
26
+ "@unocss/vite": "^66.4.2",
27
+ "@vitejs/plugin-vue": "^6.0.1",
28
+ "beasties": "^0.3.5",
29
+ "rollup-plugin-visualizer": "^6.0.3",
30
+ "vite": "^7.1.3",
31
+ "vite-plugin-vue-devtools": "^8.0.1",
32
+ "vite-ssg": "^28.1.0",
33
+ "vite-tsconfig-paths": "^5.1.4"
23
34
  }
24
35
  }
@@ -1,2 +1,2 @@
1
- export { useHead } from '@kevinmarrec/cloudstack-vue/head'
2
- export { useI18n } from '@kevinmarrec/cloudstack-vue/i18n'
1
+ export { useI18n } from '@kevinmarrec/vue-i18n'
2
+ export { useHead } from '@unhead/vue'
@@ -1,9 +1,18 @@
1
+ import { createI18n } from '@kevinmarrec/vue-i18n'
1
2
  import { VueQueryPlugin } from '@tanstack/vue-query'
2
- import { Cloudstack } from 'virtual:cloudstack'
3
+ import { ViteSSG } from 'vite-ssg/single-page'
3
4
 
4
5
  import App from './App.vue'
5
6
 
6
- export const createApp = Cloudstack(App, ({ app }) => {
7
+ import 'uno.css'
8
+
9
+ export const createApp = ViteSSG(App, async ({ app }) => {
10
+ const i18n = await createI18n({
11
+ messages: import.meta.glob('./locales/*.yml'),
12
+ })
13
+
14
+ app.use(i18n)
15
+
7
16
  app.use(VueQueryPlugin, {
8
17
  enableDevtoolsV6Plugin: true,
9
18
  })
@@ -1 +1 @@
1
- export { get } from '@kevinmarrec/cloudstack-vue'
1
+ export { get } from '@vueuse/core'
@@ -1 +1,65 @@
1
- export { default } from '@kevinmarrec/cloudstack-vite-config'
1
+ import process from 'node:process'
2
+
3
+ import darkMode from '@kevinmarrec/vite-plugin-dark-mode'
4
+ import yaml from '@modyfi/vite-plugin-yaml'
5
+ import unhead from '@unhead/addons/vite'
6
+ import unocss from '@unocss/vite'
7
+ import vue from '@vitejs/plugin-vue'
8
+ import { visualizer } from 'rollup-plugin-visualizer'
9
+ import { defineConfig } from 'vite'
10
+ import devtools from 'vite-plugin-vue-devtools'
11
+ import tsconfigPaths from 'vite-tsconfig-paths'
12
+
13
+ export default defineConfig(({ command, mode }) => ({
14
+ build: {
15
+ modulePreload: {
16
+ polyfill: false,
17
+ },
18
+ sourcemap: mode === 'analyze',
19
+ },
20
+ builder: {
21
+ async buildApp(builder) {
22
+ if (builder.config.mode === 'static') {
23
+ const { build } = await import('vite-ssg/node')
24
+ await build(builder.config.ssgOptions)
25
+ process.exit(0)
26
+ }
27
+
28
+ await builder.build(builder.environments.client)
29
+ },
30
+ },
31
+ plugins: [
32
+ vue({
33
+ features: {
34
+ optionsAPI: command !== 'build',
35
+ },
36
+ }),
37
+ yaml(),
38
+ darkMode(),
39
+ unocss(),
40
+ unhead(),
41
+ tsconfigPaths(),
42
+ devtools({
43
+ componentInspector: {
44
+ toggleComboKey: 'alt-s',
45
+ },
46
+ }),
47
+ mode === 'analyze' && visualizer({
48
+ filename: 'node_modules/.vite/stats.html',
49
+ brotliSize: true,
50
+ gzipSize: true,
51
+ open: true,
52
+ sourcemap: true,
53
+ }),
54
+ ],
55
+ ssgOptions: {
56
+ script: 'async',
57
+ formatting: 'minify',
58
+ beastiesOptions: {
59
+ reduceInlineStyles: false,
60
+ },
61
+ },
62
+ ssr: {
63
+ noExternal: ['@kevinmarrec/vue-i18n'],
64
+ },
65
+ }))
@@ -18,6 +18,7 @@ export default {
18
18
  },
19
19
  'frontend': {
20
20
  entry: ['src/main.ts'],
21
+ ignoreDependencies: ['uno.css'],
21
22
  },
22
23
  },
23
24
  } satisfies KnipConfig