File tree Expand file tree Collapse file tree 4 files changed +27
-13
lines changed Expand file tree Collapse file tree 4 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ var request = require('request')
13
13
var logger = require ( '../lib/logger' )
14
14
var generate = require ( '../lib/generate' )
15
15
var checkVersion = require ( '../lib/check-version' )
16
- var vue2VersionWarn = require ( '../lib/vue2-version-warn ' )
16
+ var warnings = require ( '../lib/warnings ' )
17
17
18
18
/**
19
19
* Usage.
@@ -105,9 +105,13 @@ function run () {
105
105
if ( template . indexOf ( '#' ) !== - 1 ) {
106
106
downloadAndGenerate ( officialTemplate )
107
107
} else {
108
+ if ( template . indexOf ( '-2.0' ) !== - 1 ) {
109
+ warnings . v2SuffixTemplatesDeprecated ( template , inPlace ? '' : name )
110
+ return
111
+ }
108
112
// until official webpack template for Vue 2.0 is released in master/dist branch
109
113
if ( template !== 'webpack' ) {
110
- vue2VersionWarn ( template , inPlace ? '' : name )
114
+ warnings . v2BranchIsNowDefault ( template , inPlace ? '' : name )
111
115
}
112
116
checkDistBranch ( officialTemplate , downloadAndGenerate )
113
117
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ var chalk = require ( 'chalk' )
2
+
3
+ module . exports = {
4
+ v2SuffixTemplatesDeprecated : function ( template , name ) {
5
+ var initCommand = 'vue init ' + template . replace ( '-2.0' , '' ) + ' ' + name
6
+
7
+ console . log ( chalk . red ( ' This template is deprecated, as the original template now uses Vue 2.0 by default.' ) )
8
+ console . log ( )
9
+ console . log ( chalk . yellow ( ' Please use this command instead: ' ) + chalk . green ( initCommand ) )
10
+ console . log ( )
11
+ } ,
12
+ v2BranchIsNowDefault : function ( template , name ) {
13
+ var vue1InitCommand = 'vue init ' + template + '#1.0' + ' ' + name
14
+
15
+ console . log ( chalk . red ( ' This will install Vue 2.x version of template.' ) )
16
+ console . log ( )
17
+ console . log ( chalk . yellow ( ' For Vue 1.x use: ' ) + chalk . green ( vue1InitCommand ) )
18
+ console . log ( )
19
+ }
20
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-cli" ,
3
- "version" : " 2.3.0 " ,
3
+ "version" : " 2.3.2 " ,
4
4
"description" : " A simple CLI for scaffolding Vue.js projects." ,
5
5
"preferGlobal" : true ,
6
6
"bin" : {
You can’t perform that action at this time.
0 commit comments