8000 Warn user about Vue 2.x template. by zigomir · Pull Request #162 · vuejs/vue-cli · GitHub
[go: up one dir, main page]

Skip to content

Warn user about Vue 2.x template. #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2016
Merged

Warn user about Vue 2.x template. #162

merged 3 commits into from
Sep 6, 2016

Conversation

zigomir
Copy link
Contributor
@zigomir zigomir commented Sep 5, 2016

Don't yet warn for webpack template since 2.0 version is not yet released.

warn for vue 2 version

/cc @chrisvfritz

8000
- don't warn for webpack template since it's not yet in master/dist branch.
@@ -12,7 +12,7 @@ var inquirer = require('inquirer')
var request = require('request')
var logger = require('../lib/logger')
var generate = require('../lib/generate')
var checkVersion = require('../lib/check-version')
var { checkVersion, warnForVue2Version } = require('../lib/check-version')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love destructuring too, 😃 but it's unfortunately only available in Node 6+ and I believe we're supporting down to v4.

@@ -36,3 +36,17 @@ module.exports = function (done) {
done()
})
}

function warnForVue2Version (template, name) {
var vue1InitCommand = 'vue init ' + template + '#1.0' + ' ' + name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also pass in inPlace and then only show the name in the command if it's false?

@chrisvfritz
Copy link
Contributor

@yyx990803 We're getting a fair amount of confusion with people not realising they're using Vue 2.0 by default in most templates now, so @zigomir came up with a fix. If possible, I think getting this out ASAP would really help.

@yyx990803 yyx990803 merged commit aa3c1f2 into master Sep 6, 2016
@zigomir zigomir deleted the vue-version-warning branch September 6, 2016 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0