Skip to content

Commit

Permalink
feat(create): more descriptions and links
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Aug 6, 2018
1 parent 8c96c15 commit 9f9ddb1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/@vue/cli/lib/promptModules/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = cli => {
value: 'babel',
short: 'Babel',
description: 'Transpile modern JavaScript to older versions (for compatibility)',
link: 'https://babeljs.io/',
checked: true
})

Expand Down
5 changes: 4 additions & 1 deletion packages/@vue/cli/lib/promptModules/cssPreprocessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ module.exports = cli => {
link: 'https://cli.vuejs.org/guide/css.html'
})

const notice = 'PostCSS, Autoprefixer and CSS Modules are supported by default'

cli.injectPrompt({
name: 'cssPreprocessor',
when: answers => answers.features.includes('css-preprocessor'),
type: 'list',
message: 'Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default):',
message: `Pick a CSS pre-processor${process.env.VUE_CLI_API_MODE ? '' : ` (${notice})`}:`,
description: `${notice}.`,
choices: [
{
name: 'SCSS/SASS',
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli/lib/promptModules/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = cli => {
when: answers => answers.features.includes('linter'),
type: 'list',
message: 'Pick a linter / formatter config:',
description: 'Checking code errors and enforcing an homogeoneous code style is recommended.',
choices: answers => [
...(
answers.features.includes('ts')
Expand Down
3 changes: 3 additions & 0 deletions packages/@vue/cli/lib/promptModules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module.exports = cli => {
when: answers => answers.features.includes('ts'),
type: 'confirm',
message: 'Use class-style component syntax?',
description: 'Use the @Component decorator on classes.',
link: 'https://vuejs.org/v2/guide/typescript.html#Class-Style-Vue-Components',
default: true
})

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

Expand Down

0 comments on commit 9f9ddb1

Please sign in to comment.