Skip to content

Commit 52ea054

Browse files
committed
refactor: do not copy .adonisrc.json file
1 parent 9d3ff1c commit 52ea054

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/bundler.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
import slash from 'slash'
1111
import fs from 'node:fs/promises'
12+
import { relative } from 'node:path'
1213
import type tsStatic from 'typescript'
1314
import { fileURLToPath } from 'node:url'
14-
import { join, relative } from 'node:path'
1515
import { cliui, type Logger } from '@poppinss/cliui'
1616

1717
import type { BundlerOptions } from './types.js'
@@ -119,25 +119,6 @@ export class Bundler {
119119
await this.#copyFiles(metaFiles, outDir)
120120
}
121121

122-
/**
123-
* Copies .adonisrc.json file to the destination
124-
*/
125-
async #copyAdonisRcFile(outDir: string) {
126-
const existingContents = JSON.parse(
127-
await fs.readFile(join(this.#cwdPath, '.adonisrc.json'), 'utf-8')
128-
)
129-
const compiledContents = Object.assign({}, existingContents, {
130-
typescript: false,
131-
lastCompiledAt: new Date().toISOString(),
132-
})
133-
134-
await fs.mkdir(outDir, { recursive: true })
135-
await fs.writeFile(
136-
join(outDir, '.adonisrc.json'),
137-
JSON.stringify(compiledContents, null, 2) + '\n'
138-
)
139-
}
140-
141122
/**
142123
* Returns the lock file name for a given packages client
143124
*/
@@ -241,12 +222,6 @@ export class Bundler {
241222
this.#logger.info('copying meta files to the output directory')
242223
await this.#copyMetaFiles(outDir, pkgFiles)
243224

244-
/**
245-
* Step 6: Copy .adonisrc.json file to the build directory
246-
*/
247-
this.#logger.info('copying .adonisrc.json file to the output directory')
248-
await this.#copyAdonisRcFile(outDir)
249-
250225
this.#logger.success('build completed')
251226
this.#logger.log('')
252227

0 commit comments

Comments
 (0)