兼容脑残的windows
parent
f01e52a415
commit
d477caf939
8
index.js
8
index.js
|
@ -9,7 +9,7 @@ import { request } from 'https'
|
||||||
import { red, cyan, blue } from 'kolorist'
|
import { red, cyan, blue } from 'kolorist'
|
||||||
import prompts from 'prompts'
|
import prompts from 'prompts'
|
||||||
import fs from 'iofs'
|
import fs from 'iofs'
|
||||||
import { resolve, join, dirname } from 'path'
|
import { resolve, join, dirname, normalize } from 'path'
|
||||||
import {
|
import {
|
||||||
writePackageJson,
|
writePackageJson,
|
||||||
writeConfigFile,
|
writeConfigFile,
|
||||||
|
@ -29,8 +29,8 @@ import {
|
||||||
} from './lib/demo-js.js'
|
} from './lib/demo-js.js'
|
||||||
|
|
||||||
const CURRENT_DIR = process.cwd()
|
const CURRENT_DIR = process.cwd()
|
||||||
const root = dirname(
|
const root = normalize(
|
||||||
import.meta.url.slice(process.platform === 'win32' ? 10 : 7)
|
dirname(import.meta.url.slice(process.platform === 'win32' ? 8 : 7))
|
||||||
)
|
)
|
||||||
const VERSION = '1.0.1'
|
const VERSION = '1.0.1'
|
||||||
|
|
||||||
|
@ -130,6 +130,8 @@ function printHelp() {
|
||||||
res.projectName = DEFAULT_NAME
|
res.projectName = DEFAULT_NAME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
targetDir = normalize(targetDir)
|
||||||
|
|
||||||
console.log('指定的项目名为: %s', cyan(res.projectName))
|
console.log('指定的项目名为: %s', cyan(res.projectName))
|
||||||
console.log('项目目录为: %s', cyan(targetDir))
|
console.log('项目目录为: %s', cyan(targetDir))
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
||||||
'vue-router': '//jscdn.ink/@bytedo/vue-router/4.1.6/vue-router.js',
|
'vue-router': '//jscdn.ink/@bytedo/vue-router/4.1.6/vue-router.js',
|
||||||
// 'vue-router': '//jscdn.ink/vue-router/4.1.6/vue-router.esm-browser.js',
|
// 'vue-router': '//jscdn.ink/vue-router/4.1.6/vue-router.esm-browser.js',
|
||||||
// '@vue/devtools-api': '//jscdn.ink/@vue/devtools-api/6.5.0/esm/index.js',
|
// '@vue/devtools-api': '//jscdn.ink/@vue/devtools-api/6.5.0/esm/index.js',
|
||||||
fetch: '//jscdn.ink/@bytedo/fetch/2.1.1/next.js'
|
fetch: '//jscdn.ink/@bytedo/fetch/2.1.5/next.js'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "create-vue-live",
|
"name": "create-vue-live",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-vue-live": "index.js"
|
"create-vue-live": "index.js"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue