|
9 | 9 |
|
10 | 10 | import slash from 'slash'
|
11 | 11 | import fs from 'node:fs/promises'
|
| 12 | +import { relative } from 'node:path' |
12 | 13 | import type tsStatic from 'typescript'
|
13 | 14 | import { fileURLToPath } from 'node:url'
|
14 |
| -import { join, relative } from 'node:path' |
15 | 15 | import { cliui, type Logger } from '@poppinss/cliui'
|
16 | 16 |
|
17 | 17 | import type { BundlerOptions } from './types.js'
|
@@ -119,25 +119,6 @@ export class Bundler {
|
119 | 119 | await this.#copyFiles(metaFiles, outDir)
|
120 | 120 | }
|
121 | 121 |
|
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 |
| - |
141 | 122 | /**
|
142 | 123 | * Returns the lock file name for a given packages client
|
143 | 124 | */
|
@@ -241,12 +222,6 @@ export class Bundler {
|
241 | 222 | this.#logger.info('copying meta files to the output directory')
|
242 | 223 | await this.#copyMetaFiles(outDir, pkgFiles)
|
243 | 224 |
|
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 |
| - |
250 | 225 | this.#logger.success('build completed')
|
251 | 226 | this.#logger.log('')
|
252 | 227 |
|
|
0 commit comments