Skip to content

Commit

Permalink
fix(configure): add entry to metaFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLanz committed Mar 6, 2024
1 parent b616ced commit f3289cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ export async function configure(command: Configure) {
*/
await codemods.updateRcFile((rcFile) => {
rcFile.addProvider('@adonisjs/i18n/i18n_provider')
rcFile.addMetaFile('resources/lang/**/*.json', false)
})
}
3 changes: 2 additions & 1 deletion tests/configure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.group('Configure', (group) => {
context.fs.basePath = fileURLToPath(BASE_URL)
})

test('create config file and register provider', async ({ fs, assert }) => {
test('create config file, register provider and update meta files', async ({ fs, assert }) => {
const ignitor = new IgnitorFactory()
.withCoreProviders()
.withCoreConfig()
Expand Down Expand Up @@ -51,6 +51,7 @@ test.group('Configure', (group) => {
await assert.fileExists('app/middleware/detect_user_locale_middleware.ts')
await assert.fileExists('adonisrc.ts')
await assert.fileContains('adonisrc.ts', '@adonisjs/i18n/i18n_provider')
await assert.fileContains('adonisrc.ts', 'resources/lang/**/*.json')
await assert.fileContains('config/i18n.ts', 'defineConfig')
await assert.fileContains(
'start/kernel.ts',
Expand Down

0 comments on commit f3289cd

Please sign in to comment.