File tree 5 files changed +18
-9
lines changed
5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ module.exports = class Creator {
169
169
} else {
170
170
// manual
171
171
options = {
172
- packageManager : answers . packageManager ,
172
+ packageManager : answers . packageManager || loadOptions ( ) . packageManager ,
173
173
plugins : { }
174
174
}
175
175
// run cb registered by prompt modules to finalize the options
@@ -242,7 +242,8 @@ module.exports = class Creator {
242
242
243
243
resolveOutroPrompts ( ) {
244
244
const outroPrompts = [ ]
245
- if ( hasYarn ) {
245
+ const savedOptions = loadOptions ( )
246
+ if ( hasYarn && ! savedOptions . packageManager ) {
246
247
outroPrompts . push ( {
247
248
name : 'packageManager' ,
248
249
when : isMode ( 'manual' ) ,
@@ -266,7 +267,7 @@ module.exports = class Creator {
266
267
name : 'save' ,
267
268
when : isMode ( 'manual' ) ,
268
269
type : 'confirm' ,
269
- message : 'Save the preferences for future projects?'
270
+ message : 'Save the preferences for future projects? (You can always manually edit ~/.vuerc) '
270
271
} )
271
272
return outroPrompts
272
273
}
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ exports.defaults = {
32
32
packageManager : hasYarn ? 'yarn' : 'npm' ,
33
33
plugins : {
34
34
'@vue/cli-plugin-babel' : { } ,
35
- '@vue/cli-plugin-eslint' : { config : 'base' , lintOn : 'save' } ,
35
+ '@vue/cli-plugin-eslint' : {
36
+ config : 'base' ,
37
+ lintOn : [ 'save' , 'commit' ]
38
+ } ,
36
39
'@vue/cli-plugin-unit-mocha' : { }
37
40
}
38
41
}
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ module.exports = cli => {
5
5
cli . injectFeature ( {
6
6
name : 'Linter / Formatter' ,
7
7
value : 'linter' ,
8
- short : 'Linter'
8
+ short : 'Linter' ,
9
+ checked : true
9
10
} )
10
11
11
12
cli . injectPrompt ( {
@@ -48,11 +49,13 @@ module.exports = cli => {
48
49
choices : [
49
50
{
50
51
name : 'Lint on save' ,
51
- value : 'save'
52
+ value : 'save' ,
53
+ checked : true
52
54
} ,
53
55
{
54
56
name : 'Lint and fix on commit' + ( hasGit ? '' : chalk . red ( ' (requires Git)' ) ) ,
55
- value : 'commit'
57
+ value : 'commit' ,
58
+ checked : true
56
59
}
57
60
]
58
61
} )
Original file line number Diff line number Diff line change 1
1
module . exports = cli => {
2
2
cli . injectFeature ( {
3
3
name : 'Progressive Web App (PWA) Support' ,
4
- value : 'pwa'
4
+ value : 'pwa' ,
5
+ short : 'PWA'
5
6
} )
6
7
7
8
cli . onPromptComplete ( ( answers , options ) => {
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ module.exports = cli => {
2
2
cli . injectFeature ( {
3
3
name : 'Unit Testing' ,
4
4
value : 'unit' ,
5
- short : 'Unit'
5
+ short : 'Unit' ,
6
+ checked : true
6
7
} )
7
8
8
9
cli . injectPrompt ( {
You can’t perform that action at this time.
0 commit comments