Skip to content

Commit

Permalink
refactor(prompts): change prompt question key
Browse files Browse the repository at this point in the history
vue-cli accepts values for parameters and our custom
--preset value conflicts
  • Loading branch information
johnleider committed Sep 13, 2022
1 parent 60595f5 commit 70a17fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vue-cli-plugin-vuetify/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ module.exports = (api, opts) => {

const fs = require('fs')

if (opts.preset !== 'configure') {
if (opts.install !== 'configure') {
opts = {
hasTS: api.hasPlugin('typescript') || Object.keys(api.generator.pkg.devDependencies).includes('typescript'),
...opts,
...require(`../presets/${opts.preset}`).plugins['vue-cli-plugin-vuetify'],
...require(`../presets/${opts.install}`).plugins['vue-cli-plugin-vuetify'],
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/vue-cli-plugin-vuetify/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const presets = require(resolve('./util/presets.js'))
const locales = require(resolve('./util/locales.js'))

function isCustom (answers) {
return answers.preset === 'configure'
return answers.install === 'configure'
}

function isVuetify3 (answers) {
return answers.preset === 'v3' || answers.preset === 'vite'
return answers.install === 'v3cli' || answers.install === 'v3vite'
}

module.exports = [
Expand Down

0 comments on commit 70a17fa

Please sign in to comment.