Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit de4f5af

Browse files
committed
Clean up
1 parent 5b19374 commit de4f5af

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bundler/mod.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class Bundler {
210210
const bundleFile = join(this.#app.buildDir, bundleFilename)
211211
if (!existsFileSync(bundleFile)) {
212212
const rawPolyfillFile = `${alephPkgUri}/bundler/polyfills/${buildTarget}/mod.ts`
213-
await this._bundle(rawPolyfillFile, bundleFile)
213+
await this.build(rawPolyfillFile, bundleFile)
214214
}
215215
this.#bundledFiles.set('polyfill', bundleFilename)
216216
log.info(` {} polyfill.js (${buildTarget.toUpperCase()}) ${dim('• ' + util.formatBytes(Deno.statSync(bundleFile).size))}`)
@@ -242,15 +242,15 @@ export class Bundler {
242242
const bundleFile = join(this.#app.buildDir, bundleFilename)
243243
if (!existsFileSync(bundleFile)) {
244244
await Deno.writeTextFile(bundleEntryFile, entryCode)
245-
await this._bundle(bundleEntryFile, bundleFile)
245+
await this.build(bundleEntryFile, bundleFile)
246246
lazyRemove(bundleEntryFile)
247247
}
248248
this.#bundledFiles.set(name, bundleFilename)
249249
log.info(` {} ${name}.js ${dim('• ' + util.formatBytes(Deno.statSync(bundleFile).size))}`)
250250
}
251251

252252
/** run deno bundle and compress the output using terser. */
253-
private async _bundle(entryFile: string, bundleFile: string) {
253+
private async build(entryFile: string, bundleFile: string) {
254254
const { buildTarget, browserslist } = this.#app.config
255255

256256
await clearBundle(bundleFile)
@@ -266,7 +266,7 @@ export class Bundler {
266266
plugins: [{
267267
name: 'http-loader',
268268
setup(build) {
269-
build.onResolve({ filter: /.*/ }, async (args) => {
269+
build.onResolve({ filter: /.*/ }, args => {
270270
if (util.isLikelyHttpURL(args.path)) {
271271
return {
272272
path: args.path,
@@ -285,7 +285,7 @@ export class Bundler {
285285
}
286286
return { path }
287287
})
288-
build.onLoad({ filter: /.*/, namespace: 'http-module' }, async (args) => {
288+
build.onLoad({ filter: /.*/, namespace: 'http-module' }, async args => {
289289
const { content } = await cache(args.path)
290290
return { contents: content }
291291
})

0 commit comments

Comments
 (0)