Skip to content

Commit

Permalink
feat(module): rerun prepare command after installing module
Browse files Browse the repository at this point in the history
resolves #520
  • Loading branch information
danielroe committed Oct 22, 2024
1 parent c028656 commit 61f0172
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/module/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { satisfies } from 'semver'
import { updateConfig } from 'c12/update'
import { colors } from 'consola/utils'
import { sharedArgs } from '../_shared'
import { runCommand } from '../../run'
import {
checkNuxtCompatibility,
fetchModules,
Expand Down Expand Up @@ -116,6 +117,10 @@ export default defineCommand({
return null
})
}

// update the types for new module
const args = Object.entries(ctx.args).filter(([k]) => k in sharedArgs).map(([k, v]) => `--${k}=${v}`)
await runCommand('prepare', args)
},
})

Expand Down

0 comments on commit 61f0172

Please sign in to comment.