Skip to content

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

Merged
merged 2 commits into from
Sep 22, 2016
Merged

Conversation

zigomir
Copy link
Contributor

@zigomir zigomir commented Sep 21, 2016

Fixes #171

@zigomir
Copy link
Contributor Author

zigomir commented Sep 21, 2016

@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.'))
Copy link
Contributor

@chrisvfritz chrisvfritz Sep 21, 2016

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) {
Copy link
Contributor

@chrisvfritz chrisvfritz Sep 21, 2016

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) {
Copy link
Contributor

@chrisvfritz chrisvfritz Sep 21, 2016

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?

@zigomir zigomir merged commit 2a3431f into master Sep 22, 2016
@zigomir zigomir deleted the 2.0-deprecation-warning branch September 22, 2016 05:03
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.

2 participants