Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
⚡ improvement(ui): tweak i18n:report task
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 4, 2019
1 parent 337f46e commit 40e1843
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,40 @@ module.exports = api => {
}
})

api.describeTask({
match: /vue-cli-service i18n:report/,
description: 'Report the missing locale message keys and unused keys',
icon: '/_plugin/vue-cli-plugin-i18n/nav-logo.svg',
prompts: [{
name: 'type',
description: 'reporting type',
type: 'list',
default: 'missing & unused',
choices: [{
name: 'missing & unused',
value: 'missing & unused'
}, {
name: 'missing',
value: 'missing'
}, {
name: 'unused',
value: 'unused'
}]
}, {
name: 'output',
description: 'create a json file out of report',
type: 'input'
}],
onBeforeRun: async ({ answers, args }) => {
if (answers.type && answers.type !== 'missing & unused') {
args.push('--type', answers.type)
}
if (answers.output) {
args.push('--output', answers.output)
}
},
})

api.addView({
id: 'org.kazupon.vue-i18n.views.entry',
name: 'org.kazupon.vue-i18n.routes.entry',
Expand Down

0 comments on commit 40e1843

Please sign in to comment.