create-vuetify 3.0.12-beta-next.3 → 3.0.12-next.1

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.mjs CHANGED
@@ -32784,7 +32784,7 @@ function registerProjectArgsCompletion(completion) {
32784
32784
 
32785
32785
  //#endregion
32786
32786
  //#region package.json
32787
- var version = "3.0.12-beta-next.3";
32787
+ var version = "3.0.12-next.1";
32788
32788
 
32789
32789
  //#endregion
32790
32790
  //#region src/commands/upgrade.ts
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "create-vuetify",
3
- "version": "3.0.12-beta-next.3",
3
+ "version": "3.0.12-next.1",
4
4
  "description": "Create a new Vuetify project",
5
5
  "type": "module",
6
+ "files": [
7
+ "dist",
8
+ "README.md",
9
+ "LICENSE"
10
+ ],
6
11
  "bin": {
7
12
  "create-vuetify": "./dist/index.mjs"
8
13
  },
@@ -20,7 +25,7 @@
20
25
  "pathe": "^2.0.3",
21
26
  "tsdown": "^0.16.8",
22
27
  "vitest": "^4.0.17",
23
- "@vuetify/cli-shared": "0.0.12-beta.3"
28
+ "@vuetify/cli-shared": "0.0.12"
24
29
  },
25
30
  "main": "./dist/index.mjs",
26
31
  "module": "./dist/index.mjs",
@@ -1,5 +0,0 @@
1
- import { commandUpgradeFabric } from '@vuetify/cli-shared'
2
-
3
- export const upgrade = commandUpgradeFabric('create-vuetify')
4
-
5
- export default upgrade
package/src/index.ts DELETED
@@ -1,40 +0,0 @@
1
- import tab from '@bomb.sh/tab/citty'
2
- import { createVuetify, projectArgs, registerProjectArgsCompletion } from '@vuetify/cli-shared'
3
- import { i18n } from '@vuetify/cli-shared/i18n'
4
- import { defineCommand, runMain } from 'citty'
5
-
6
- import { version } from '../package.json'
7
- import { upgrade } from './commands/upgrade'
8
-
9
- export const main = defineCommand({
10
- meta: {
11
- name: 'create-vuetify',
12
- version,
13
- description: i18n.t('cli.create.description'),
14
- },
15
- args: {
16
- ...projectArgs(),
17
- cwd: {
18
- type: 'string',
19
- description: 'The current working directory',
20
- },
21
- },
22
- run: async ({ args }) => {
23
- if (args._[0] === 'complete') {
24
- return
25
- }
26
- await createVuetify({
27
- ...args,
28
- version,
29
- })
30
- },
31
- subCommands: {
32
- upgrade,
33
- },
34
- })
35
-
36
- await tab(main).then(completion => {
37
- registerProjectArgsCompletion(completion)
38
- })
39
-
40
- runMain(main)
@@ -1,117 +0,0 @@
1
- import fs from 'node:fs'
2
- import { join, resolve } from 'pathe'
3
- import { x } from 'tinyexec'
4
- import { afterAll, beforeAll, describe, expect, it } from 'vitest'
5
-
6
- const CLI_PATH = resolve(__dirname, '../dist/index.mjs')
7
- // Assuming templates are at the root of the repo
8
- const TEMPLATES_PATH = resolve(__dirname, '../../../templates')
9
- const TEMP_DIR = resolve(__dirname, '../.test-tmp')
10
-
11
- const TIMEOUT = 10_000 // 10s
12
-
13
- describe('create-vuetify matrix', () => {
14
- beforeAll(() => {
15
- if (!fs.existsSync(TEMP_DIR)) {
16
- fs.mkdirSync(TEMP_DIR)
17
- }
18
- })
19
-
20
- afterAll(() => {
21
- // fs.rmSync(TEMP_DIR, { recursive: true, force: true })
22
- })
23
-
24
- const runCli = async (args: string[], cwd: string) => {
25
- try {
26
- const proc = x('node', [CLI_PATH, ...args], {
27
- nodeOptions: {
28
- cwd,
29
- env: {
30
- ...process.env,
31
- VUETIFY_CLI_TEMPLATES_PATH: TEMPLATES_PATH,
32
- },
33
- },
34
- throwOnError: true,
35
- })
36
-
37
- for await (const line of proc) {
38
- console.log(line)
39
- }
40
-
41
- return await proc
42
- } catch (error: any) {
43
- console.error('Command failed:', error.message)
44
- console.error('STDOUT:', error.stdout)
45
- console.error('STDERR:', error.stderr)
46
- throw error
47
- }
48
- }
49
-
50
- const matrix = [
51
- // Vue + JS
52
- { name: 'vue-js', args: ['--type=vue', '--no-typescript', '--features='] },
53
- // Vue + TS
54
- { name: 'vue-ts', args: ['--type=vue', '--typescript', '--features='] },
55
- // Vue + TS + Router
56
- { name: 'vue-ts-router', args: ['--type=vue', '--typescript', '--router=router'] },
57
- // Vue + TS + Pinia
58
- { name: 'vue-ts-pinia', args: ['--type=vue', '--typescript', '--features=pinia'] },
59
- // Vue + TS + ESLint
60
- { name: 'vue-ts-eslint', args: ['--type=vue', '--typescript', '--features=eslint'] },
61
- // Vue + TS + All
62
- { name: 'vue-ts-all', args: ['--type=vue', '--typescript', '--router=router', '--features=pinia,eslint'] },
63
-
64
- // Nuxt
65
- { name: 'nuxt', args: ['--type=nuxt', '--features='] },
66
- // Nuxt + Pinia
67
- { name: 'nuxt-pinia', args: ['--type=nuxt', '--features=pinia'] },
68
- // Nuxt + Vuetify Module
69
- { name: 'nuxt-module', args: ['--type=nuxt', '--features=vuetify-nuxt-module'] },
70
- // Nuxt + All
71
- { name: 'nuxt-all', args: ['--type=nuxt', '--features=pinia,eslint,vuetify-nuxt-module'] },
72
- ]
73
-
74
- for (const { name, args } of matrix) {
75
- it(`should create project ${name}`, async () => {
76
- const projectName = `test-${name}`
77
- const projectPath = join(TEMP_DIR, projectName)
78
-
79
- // Clean up previous run
80
- if (fs.existsSync(projectPath)) {
81
- fs.rmSync(projectPath, { recursive: true, force: true })
82
- }
83
-
84
- const cliArgs = [`--name=${projectName}`, ...args, '--package-manager=pnpm', '--force', '--no-install', '--no-interactive']
85
-
86
- console.log(`Running: create-vuetify ${cliArgs.join(' ')}`)
87
- const { stdout, stderr } = await runCli(cliArgs, TEMP_DIR)
88
- console.log('STDOUT:', stdout)
89
- if (stderr) {
90
- console.error('STDERR:', stderr)
91
- }
92
-
93
- expect(fs.existsSync(projectPath)).toBe(true)
94
- expect(fs.existsSync(join(projectPath, 'package.json'))).toBe(true)
95
-
96
- // Basic check for file structure
97
- if (args.includes('vue')) {
98
- expect(fs.existsSync(join(projectPath, 'src/main.ts')) || fs.existsSync(join(projectPath, 'src/main.js'))).toBe(true)
99
- } else if (args.includes('nuxt')) {
100
- expect(fs.existsSync(join(projectPath, 'nuxt.config.ts'))).toBe(true)
101
-
102
- // Check for modules/vuetify.ts and dependencies
103
- const hasModuleFeature = args.some(arg => arg.includes('vuetify-nuxt-module'))
104
- if (hasModuleFeature) {
105
- expect(fs.existsSync(join(projectPath, 'modules/vuetify.ts'))).toBe(false)
106
- } else {
107
- expect(fs.existsSync(join(projectPath, 'modules/vuetify.ts'))).toBe(true)
108
-
109
- const pkg = JSON.parse(fs.readFileSync(join(projectPath, 'package.json'), 'utf8'))
110
- expect(pkg.devDependencies).toHaveProperty('vite-plugin-vuetify')
111
- expect(pkg.devDependencies).toHaveProperty('@vuetify/loader-shared')
112
- expect(pkg.devDependencies).toHaveProperty('pathe')
113
- }
114
- }
115
- }, TIMEOUT)
116
- }
117
- })
package/tsdown.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'tsdown/config'
2
-
3
- export default defineConfig({
4
- entry: './src/index.ts',
5
- banner: `#!/usr/bin/env node`,
6
- exports: true,
7
- })