@vuetify/cli 0.0.2
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/README.md +65 -0
- package/dist/index.js +31347 -0
- package/dist/multipart-parser-BAp5_xBC.js +175 -0
- package/dist/node-DaMsCoIv.js +4003 -0
- package/dist/prompt-Bvac38n6.js +848 -0
- package/package.json +30 -0
- package/src/commands/docs.ts +23 -0
- package/src/commands/init.ts +30 -0
- package/src/commands/update.ts +40 -0
- package/src/commands/upgrade.ts +5 -0
- package/src/index.ts +26 -0
- package/tsdown.config.ts +7 -0
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vuetify/cli",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Vuetify CLI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vuetify": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "Andrey Yolkin <andreyyolkin@gmail.com>",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"citty": "^0.1.6",
|
|
14
|
+
"giget": "^2.0.0",
|
|
15
|
+
"kolorist": "^1.8.0",
|
|
16
|
+
"nypm": "^0.6.2",
|
|
17
|
+
"open": "^10.2.0",
|
|
18
|
+
"tsdown": "^0.15.11",
|
|
19
|
+
"@vuetify/cli-shared": "0.0.2"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"module": "./dist/index.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/index.js",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsdown"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { openVuetifyDocs } from '@vuetify/cli-shared'
|
|
2
|
+
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
3
|
+
import { defineCommand } from 'citty'
|
|
4
|
+
|
|
5
|
+
export const docs = defineCommand({
|
|
6
|
+
meta: {
|
|
7
|
+
name: 'docs',
|
|
8
|
+
description: i18n.t('commands.docs.description'),
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
version: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
alias: 'v',
|
|
14
|
+
description: i18n.t('args.version.description'),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
run: async ctx => {
|
|
18
|
+
const version = ctx.args.version
|
|
19
|
+
await openVuetifyDocs(version, { cwd: process.cwd() })
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
export default docs
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { relative, resolve } from 'node:path'
|
|
2
|
+
import { projectArgs, type ProjectArgs } from '@vuetify/cli-shared'
|
|
3
|
+
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
4
|
+
import { defineCommand } from 'citty'
|
|
5
|
+
|
|
6
|
+
const cwd = process.cwd()
|
|
7
|
+
|
|
8
|
+
export const init = defineCommand({
|
|
9
|
+
meta: {
|
|
10
|
+
name: 'init',
|
|
11
|
+
description: i18n.t('commands.init.description'),
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
...projectArgs('vuetify'),
|
|
15
|
+
v0: {
|
|
16
|
+
type: 'boolean',
|
|
17
|
+
description: i18n.t('commands.init.v0.description'),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
run: ({ args }: { args: ProjectArgs }) => {
|
|
21
|
+
const dir = args.dir
|
|
22
|
+
const relativeDir = relative(cwd, resolve(cwd, dir))
|
|
23
|
+
console.log(i18n.t('commands.init.creating_project', { dir: relativeDir }))
|
|
24
|
+
|
|
25
|
+
// TODO: Implement Vuetify project template download
|
|
26
|
+
console.log('Vuetify project initialization will be implemented here')
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export default init
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
2
|
+
import { defineCommand } from 'citty'
|
|
3
|
+
|
|
4
|
+
const packages = ['vuetify', '@vuetify/v0', '@vuetify/paper', 'vuetify-nuxt-module']
|
|
5
|
+
|
|
6
|
+
export const update = defineCommand({
|
|
7
|
+
meta: {
|
|
8
|
+
name: 'update',
|
|
9
|
+
description: i18n.t('commands.update.description'),
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
nightly: {
|
|
13
|
+
type: 'boolean',
|
|
14
|
+
description: i18n.t('commands.update.nightly.description'),
|
|
15
|
+
},
|
|
16
|
+
packages: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: i18n.t('commands.update.packages.description'),
|
|
19
|
+
default: packages.join(','),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
run: ({ args }: { args: { nightly: boolean, packages: string } }) => {
|
|
23
|
+
console.log(i18n.t('commands.update.stub'))
|
|
24
|
+
const nightly = Boolean(args.nightly)
|
|
25
|
+
const list = (args.packages)
|
|
26
|
+
.split(',')
|
|
27
|
+
.map(s => s.trim())
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
|
|
30
|
+
console.log(i18n.t('commands.update.nightly_status', { status: i18n.t(nightly ? 'common.enabled' : 'common.disabled') }))
|
|
31
|
+
if (list.length > 0) {
|
|
32
|
+
console.log(i18n.t('commands.update.packages_to_update', { pkgs: list.join(', ') }))
|
|
33
|
+
} else {
|
|
34
|
+
console.log(i18n.t('commands.update.no_packages_specified'))
|
|
35
|
+
}
|
|
36
|
+
// TODO: Implement actual package update logic with optional nightly builds
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
export default update
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { add } from '@vuetify/cli-shared/commands'
|
|
2
|
+
import { i18n } from '@vuetify/cli-shared/i18n'
|
|
3
|
+
|
|
4
|
+
import { defineCommand, runMain } from 'citty'
|
|
5
|
+
import { version } from '../package.json'
|
|
6
|
+
import { docs } from './commands/docs'
|
|
7
|
+
import { init } from './commands/init'
|
|
8
|
+
import { update } from './commands/update'
|
|
9
|
+
import { upgrade } from './commands/upgrade'
|
|
10
|
+
|
|
11
|
+
export const main = defineCommand({
|
|
12
|
+
meta: {
|
|
13
|
+
name: '@vuetify/cli',
|
|
14
|
+
version,
|
|
15
|
+
description: i18n.t('cli.main.description'),
|
|
16
|
+
},
|
|
17
|
+
subCommands: {
|
|
18
|
+
init,
|
|
19
|
+
add,
|
|
20
|
+
update,
|
|
21
|
+
docs,
|
|
22
|
+
upgrade,
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
runMain(main)
|