-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Add -2.0 templates deprecation warning. #176
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
Conversation
@chrisvfritz please take a look. |
deprecation: function (template, name) { | ||
var initCommand = 'vue init ' + template.replace('-2.0', '') + ' ' + name | ||
|
||
console.log(chalk.red(' This template is deprecated.')) |
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.
Perhaps it would be good to add a bit more information here. For example:
This template is deprecated, as the original template now uses Vue 2.0 by default.
Just so that they know the new command will still use 2.0.
var chalk = require('chalk') | ||
|
||
module.exports = { | ||
deprecation: function (template, name) { |
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.
Since we might want to have other kinds of deprecations in the future, maybe we can rename this warning to v2SuffixTemplatesDeprecated
. I know it's a bit long, but I think that's fine since we're not using it constantly. It's also much clearer what's being deprecated.
console.log(chalk.yellow(' Please use this command instead: ') + chalk.green(initCommand)) | ||
console.log() | ||
}, | ||
vue2Version: function (template, name) { |
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.
While we're here, maybe rename this to a more descriptive v2BranchIsNowDefault
? What do you think?
Fixes #171