File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 9
9
. command ( 'init' , 'generate a new project from a template' )
10
10
. command ( 'list' , 'list available official templates' )
11
11
. command ( 'build' , 'prototype a new project' )
12
-
13
- // output help information on unknown commands
14
- program
15
- . arguments ( '<command>' )
16
- . action ( ( cmd ) => {
17
- console . log ( )
18
- console . log ( ` ` + chalk . red ( `Unknown command ${ chalk . yellow ( cmd ) } .` ) )
19
- if ( cmd === 'create' ) {
20
- console . log ( ` ` + chalk . cyan ( `vue create` ) + ' is a Vue CLI 3 only command and you are using Vue CLI 2.x.' )
21
- }
22
- console . log ( )
23
- } )
12
+ . command ( 'create' , '(for v3 warning only)' )
24
13
25
14
program . parse ( process . argv )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ const chalk = require ( 'chalk' )
4
+
5
+ console . log ( )
6
+ console . log (
7
+ ` ` +
8
+ chalk . yellow ( `vue create` ) +
9
+ ' is a Vue CLI 3 only command and you are using Vue CLI ' +
10
+ require ( '../package.json' ) . version + '.'
11
+ )
12
+ console . log ( ` You may want to run the following to upgrade to Vue CLI 3:` )
13
+ console . log ( )
14
+ console . log ( chalk . cyan ( ` npm uninstall -g vue-cli` ) )
15
+ console . log ( chalk . cyan ( ` npm install -g @vue/cli` ) )
16
+ console . log ( )
You can’t perform that action at this time.
0 commit comments