fixed
parent
94dcc67db1
commit
b85899650e
7
index.js
7
index.js
|
@ -28,7 +28,9 @@ import {
|
||||||
} from './lib/demo-js.js'
|
} from './lib/demo-js.js'
|
||||||
|
|
||||||
const CURRENT_DIR = process.cwd()
|
const CURRENT_DIR = process.cwd()
|
||||||
const root = dirname(import.meta.url.slice(process.platform === 'win32' ? 10 : 7))
|
const root = dirname(
|
||||||
|
import.meta.url.slice(process.platform === 'win32' ? 10 : 7)
|
||||||
|
)
|
||||||
const { version } = JSON.parse(fs.cat(join(root, './package.json')))
|
const { version } = JSON.parse(fs.cat(join(root, './package.json')))
|
||||||
|
|
||||||
const DEFAULT_NAME = 'vue-live-app'
|
const DEFAULT_NAME = 'vue-live-app'
|
||||||
|
@ -81,7 +83,8 @@ function printHelp() {
|
||||||
{
|
{
|
||||||
name: 'shouldOverwrite',
|
name: 'shouldOverwrite',
|
||||||
type: _ => (isEmpty(targetDir) ? null : 'toggle'),
|
type: _ => (isEmpty(targetDir) ? null : 'toggle'),
|
||||||
message: _ => `目录 ${cyan(targetDir)} 非空, 是否${red('删除')}目录下所有的文件?`,
|
message: _ =>
|
||||||
|
`目录 ${cyan(targetDir)} 非空, 是否${red('删除')}目录下所有的文件?`,
|
||||||
initial: false,
|
initial: false,
|
||||||
active: '是',
|
active: '是',
|
||||||
inactive: '否'
|
inactive: '否'
|
||||||
|
|
|
@ -16,11 +16,11 @@ export function writePackageJson(file, name) {
|
||||||
start: 'vue-live dev',
|
start: 'vue-live dev',
|
||||||
build: 'vue-live build'
|
build: 'vue-live build'
|
||||||
},
|
},
|
||||||
dependencies: {
|
devDependencies: {
|
||||||
'@bytedo/vue-live': '^0.0.11'
|
'@bytedo/vue-live': '^0.0.15'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
' ',
|
'null,
|
||||||
2
|
2
|
||||||
),
|
),
|
||||||
file
|
file
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "create-vue-live",
|
"name": "create-vue-live",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.12",
|
"version": "0.0.15",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-vue-live": "index.js"
|
"create-vue-live": "index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue