create-vuetify 3.0.12-beta-next.2 → 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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016-now Vuetify, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,37 +1,52 @@
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://cdn.vuetifyjs.com/docs/images/logos/vcreate-logo-dark.png">
4
+ <img alt="Vuetify Create Logo" src="https://cdn.vuetifyjs.com/docs/images/logos/vcreate-logo-light.png" height="150">
5
+ </picture>
6
+ </div>
7
+
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/create-vuetify">
10
+ <img src="https://img.shields.io/npm/v/create-vuetify.svg" alt="Version">
11
+ </a>
12
+ <a href="https://www.npmjs.com/package/create-vuetify">
13
+ <img src="https://img.shields.io/npm/dt/create-vuetify.svg" alt="Downloads">
14
+ </a>
15
+ <br>
16
+ <a href="https://github.com/vuetifyjs/cli/blob/master/LICENSE">
17
+ <img src="https://img.shields.io/npm/l/create-vuetify.svg" alt="License">
18
+ </a>
19
+ <a href="https://community.vuetifyjs.com">
20
+ <img src="https://discordapp.com/api/guilds/340160225338195969/widget.png" alt="Chat">
21
+ </a>
22
+ </p>
23
+
1
24
  # create-vuetify
2
25
 
3
- Create a new Vuetify project.
26
+ The easiest way to start a new Vuetify project.
4
27
 
5
28
  ## Usage
6
29
 
7
- ```sh
8
- # npm
30
+ With **npm**:
31
+ ```bash
9
32
  npm create vuetify
33
+ ```
10
34
 
11
- # pnpm
35
+ With **pnpm**:
36
+ ```bash
12
37
  pnpm create vuetify
38
+ ```
13
39
 
14
- # yarn
40
+ With **yarn**:
41
+ ```bash
15
42
  yarn create vuetify
43
+ ```
16
44
 
17
- # bun
45
+ With **bun**:
46
+ ```bash
18
47
  bun create vuetify
19
-
20
- # deno
21
- deno run -A npm:create-vuetify
22
48
  ```
23
49
 
24
- ## Status
25
-
26
- Work in progress.
27
-
28
- ## Development
29
-
30
- This package is part of the Vuetify CLI monorepo. From the repo root:
31
-
32
- - Install deps: `pnpm install`
33
- - Build: `pnpm -F create-vuetify run build`
34
-
35
50
  ## License
36
51
 
37
- MIT
52
+ [MIT License](./LICENSE)
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.2";
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.2",
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.2"
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
- })