File tree Expand file tree Collapse file tree 6 files changed +26
-6
lines changed
packages/@vue/cli-global-utils/lib/promptModules Expand file tree Collapse file tree 6 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = cli => {
2
+ const featureName = 'CSS Pre-processors'
3
+
2
4
cli . injectFeature ( {
3
- name : 'CSS Pre-processors' ,
5
+ name : featureName ,
4
6
value : 'css-preprocessor' ,
5
7
description : 'Add support for CSS pre-processors like Sass, Less or Stylus' ,
6
8
link : 'https://cli.vuejs.org/guide/css.html'
@@ -14,6 +16,7 @@ module.exports = cli => {
14
16
type : 'list' ,
15
17
message : `Pick a CSS pre-processor${ process . env . VUE_CLI_API_MODE ? '' : ` (${ notice } )` } :` ,
16
18
description : `${ notice } .` ,
19
+ group : featureName ,
17
20
choices : [
18
21
// In Vue CLI <= 3.3, the value of Sass option in 'sass' an means 'node-sass'.
19
22
// Considering the 'sass' package on NPM is actually for Dart Sass, we renamed it to 'node-sass'.
Original file line number Diff line number Diff line change 1
1
module . exports = cli => {
2
+ const featureName = 'E2E Testing'
3
+
2
4
cli . injectFeature ( {
3
- name : 'E2E Testing' ,
5
+ name : featureName ,
4
6
value : 'e2e' ,
5
7
short : 'E2E' ,
6
8
description : 'Add an End-to-End testing solution to the app like Cypress or Nightwatch' ,
@@ -13,6 +15,7 @@ module.exports = cli => {
13
15
when : answers => answers . features . includes ( 'e2e' ) ,
14
16
type : 'list' ,
15
17
message : 'Pick a E2E testing solution:' ,
18
+ group : featureName ,
16
19
choices : [
17
20
{
18
21
name : 'Cypress (Chrome only)' ,
Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ module.exports = cli => {
4
4
eslintConfig
5
5
} = require ( '@vue/cli-shared-utils/lib/pluginPrompts/eslint' )
6
6
7
+ const FeatureName = 'Linter / Formatter'
8
+
7
9
cli . injectFeature ( {
8
- name : 'Linter / Formatter' ,
10
+ name : FeatureName ,
9
11
value : 'linter' ,
10
12
short : 'Linter' ,
11
13
description : 'Check and enforce code quality with ESLint or Prettier' ,
@@ -17,6 +19,7 @@ module.exports = cli => {
17
19
cli . injectPrompt ( {
18
20
...eslintConfig ,
19
21
name : 'eslintConfig' ,
22
+ group : FeatureName ,
20
23
when : answers => answers . features . includes ( 'linter' ) ,
21
24
choices : answers => [
22
25
...(
@@ -34,6 +37,7 @@ module.exports = cli => {
34
37
35
38
cli . injectPrompt ( {
36
39
...lintOn ,
40
+ group : FeatureName ,
37
41
when : answers => answers . features . includes ( 'linter' )
38
42
} )
39
43
Original file line number Diff line number Diff line change @@ -3,15 +3,18 @@ module.exports = cli => {
3
3
historyMode
4
4
} = require ( '@vue/cli-shared-utils/lib/pluginPrompts/router' )
5
5
6
+ const featureName = 'Router'
7
+
6
8
cli . injectFeature ( {
7
- name : 'Router' ,
9
+ name : featureName ,
8
10
value : 'router' ,
9
11
description : 'Structure the app with dynamic pages' ,
10
12
link : 'https://router.vuejs.org/'
11
13
} )
12
14
13
15
cli . injectPrompt ( {
14
16
...historyMode ,
17
+ group : featureName ,
15
18
when : answers => answers . features . includes ( 'router' )
16
19
} )
17
20
Original file line number Diff line number Diff line change 4
4
} = require ( '@vue/cli-shared-utils/lib/pluginPrompts/typescript' )
5
5
6
6
module . exports = cli => {
7
+ const featureName = 'TypeScript'
8
+
7
9
cli . injectFeature ( {
8
- name : 'TypeScript' ,
10
+ name : featureName ,
9
11
value : 'ts' ,
10
12
short : 'TS' ,
11
13
description : 'Add support for the TypeScript language' ,
@@ -16,11 +18,13 @@ module.exports = cli => {
16
18
cli . injectPrompt ( {
17
19
...classComponent ,
18
20
name : 'tsClassComponent' ,
21
+ group : featureName ,
19
22
when : answers => answers . features . includes ( 'ts' )
20
23
} )
21
24
22
25
cli . injectPrompt ( {
23
26
...useTsWithBabel ,
27
+ group : featureName ,
24
28
when : answers => answers . features . includes ( 'ts' ) ,
25
29
default : answers => answers . features . includes ( 'babel' )
26
30
} )
Original file line number Diff line number Diff line change 1
1
module . exports = cli => {
2
+ const featureName = 'Unit Testing'
3
+
2
4
cli . injectFeature ( {
3
- name : 'Unit Testing' ,
5
+ name : featureName ,
4
6
value : 'unit' ,
5
7
short : 'Unit' ,
6
8
description : 'Add a Unit Testing solution like Jest or Mocha' ,
@@ -13,6 +15,7 @@ module.exports = cli => {
13
15
when : answers => answers . features . includes ( 'unit' ) ,
14
16
type : 'list' ,
15
17
message : 'Pick a unit testing solution:' ,
18
+ group : featureName ,
16
19
choices : [
17
20
{
18
21
name : 'Mocha + Chai' ,
You can’t perform that action at this time.
0 commit comments