We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90f5d5e commit 5063ac5Copy full SHA for 5063ac5
bin/vue-init
@@ -55,6 +55,7 @@ process.on('exit', function () {
55
*/
56
57
var template = program.args[0]
58
+var hasSlash = template.indexOf('/') > -1
59
var name = program.args[1]
60
var dir = program.directory
61
var to = resolve(name)
@@ -64,7 +65,7 @@ if (exists(to)) logger.fatal('"%s" already exists.', name)
64
65
* Detect if template on file system.
66
67
-if (exists(template)) {
68
+if (hasSlash && exists(template)) {
69
generate(template, to, function (err) {
70
if (err) logger.fatal(err)
71
console.log()
@@ -75,7 +76,7 @@ if (exists(template)) {
75
76
* Detect official template.
77
78
- if (!~template.indexOf('/')) {
79
+ if (!hasSlash) {
80
template = 'vuejs-templates/' + template
81
}
82
0 commit comments