Skip to content

Commit 9f9ddb1

Browse files
author
Guillaume Chau
committed
feat(create): more descriptions and links
1 parent 8c96c15 commit 9f9ddb1

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

packages/@vue/cli/lib/promptModules/babel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = cli => {
44
value: 'babel',
55
short: 'Babel',
66
description: 'Transpile modern JavaScript to older versions (for compatibility)',
7+
link: 'https://babeljs.io/',
78
checked: true
89
})
910

packages/@vue/cli/lib/promptModules/cssPreprocessors.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ module.exports = cli => {
66
link: 'https://cli.vuejs.org/guide/css.html'
77
})
88

9+
const notice = 'PostCSS, Autoprefixer and CSS Modules are supported by default'
10+
911
cli.injectPrompt({
1012
name: 'cssPreprocessor',
1113
when: answers => answers.features.includes('css-preprocessor'),
1214
type: 'list',
13-
message: 'Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default):',
15+
message: `Pick a CSS pre-processor${process.env.VUE_CLI_API_MODE ? '' : ` (${notice})`}:`,
16+
description: `${notice}.`,
1417
choices: [
1518
{
1619
name: 'SCSS/SASS',

packages/@vue/cli/lib/promptModules/linter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = cli => {
1717
when: answers => answers.features.includes('linter'),
1818
type: 'list',
1919
message: 'Pick a linter / formatter config:',
20+
description: 'Checking code errors and enforcing an homogeoneous code style is recommended.',
2021
choices: answers => [
2122
...(
2223
answers.features.includes('ts')

packages/@vue/cli/lib/promptModules/typescript.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module.exports = cli => {
1313
when: answers => answers.features.includes('ts'),
1414
type: 'confirm',
1515
message: 'Use class-style component syntax?',
16+
description: 'Use the @Component decorator on classes.',
17+
link: 'https://vuejs.org/v2/guide/typescript.html#Class-Style-Vue-Components',
1618
default: true
1719
})
1820

@@ -21,6 +23,7 @@ module.exports = cli => {
2123
when: answers => answers.features.includes('ts'),
2224
type: 'confirm',
2325
message: 'Use Babel alongside TypeScript for auto-detected polyfills?',
26+
description: 'It will output ES2015 and delegate the rest to Babel for auto polyfill based on browser targets.',
2427
default: answers => answers.features.includes('babel')
2528
})
2629

0 commit comments

Comments
 (0)