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

Commit

Permalink
feat: Composition API installing noticement (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Sep 30, 2021
1 parent 2e2074a commit f6b642e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ module.exports = {

Whether to set up a birdge to migrate to `[email protected]` from `[email protected]`, Default `No` in prompt.

> ⚠️ NOTE: If you use the Composition API with `vue-i18n-bridge` in birdge mode, you need to install [`@vue/composition-api`](https://github.com/vuejs/composition-api).
### `includeLocales`

- **Type:** `boolean`
Expand Down
12 changes: 12 additions & 0 deletions generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {
readEnv,
buildEnvContent
} = require('../utils')
const chalk = require(require.resolve('chalk'))

module.exports = (api, options, rootOptions) => {
const {
Expand Down Expand Up @@ -157,5 +158,16 @@ module.exports = (api, options, rootOptions) => {
api.exitLog(`cannot write to ${envPath}`, 'error')
return
}

if (
enableBridge &&
checkInstalled('./node_modules/@vue/composition-api/package.json')
) {
api.exitLog(
chalk.yellow.underline(
`You need to install '@vue/composition-api' https://github.com/vuejs/composition-api`
)
)
}
})
}

0 comments on commit f6b642e

Please sign in to comment.