-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var chalk = require('chalk') | ||
|
||
module.exports = function (template, name) { | ||
var vue1InitCommand = 'vue init ' + template + '#1.0' + ' ' + name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also pass in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking doing this on call site: vue2VersionWarn(template, inPlace ? '' : name) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That works. 👍 |
||
|
||
console.log(chalk.red(' This will install Vue 2.x version of template.')) | ||
console.log() | ||
console.log(chalk.yellow(' For Vue 1.x use: ') + chalk.green(vue1InitCommand)) | ||
console.log() | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the addition of
officialTemplate
! Makes the code a bit clearer and keeps the value oftemplate
more predictable as exactly what the user entered or the computed working directory. 👍