Skip to content

Commit 35f7f64

Browse files
[autofix.ci] apply automated fixes
1 parent c5cc800 commit 35f7f64

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/bundler/executables.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ import icon from "./icon.png" with { type: "file" };
411411
import { file } from "bun";
412412

413413
// Get file contents as different types
414-
const bytes = await file(icon).arrayBuffer(); // ArrayBuffer
415-
const text = await file(icon).text(); // string (for text files)
416-
const blob = file(icon); // Blob
414+
const bytes = await file(icon).arrayBuffer(); // ArrayBuffer
415+
const text = await file(icon).text(); // string (for text files)
416+
const blob = file(icon); // Blob
417417

418418
// Stream the file in a response
419419
export default {
@@ -458,7 +458,9 @@ import { file } from "bun";
458458
const defaultConfig = await file(configPath).json();
459459

460460
// Merge with user config if it exists
461-
const userConfig = await file("./user-config.json").json().catch(() => ({}));
461+
const userConfig = await file("./user-config.json")
462+
.json()
463+
.catch(() => ({}));
462464
const config = { ...defaultConfig, ...userConfig };
463465
```
464466

@@ -494,9 +496,7 @@ import { file } from "bun";
494496

495497
async function sendWelcomeEmail(user: { name: string; email: string }) {
496498
const template = await file(templatePath).text();
497-
const html = template
498-
.replace("{{name}}", user.name)
499-
.replace("{{email}}", user.email);
499+
const html = template.replace("{{name}}", user.name).replace("{{email}}", user.email);
500500

501501
// Send email with the rendered template...
502502
}
@@ -588,7 +588,7 @@ for (const blob of embeddedFiles) {
588588
Each item in `Bun.embeddedFiles` is a `Blob` with a `name` property:
589589

590590
```ts
591-
embeddedFiles: ReadonlyArray<Blob>
591+
embeddedFiles: ReadonlyArray<Blob>;
592592
```
593593

594594
This is useful for dynamically serving all embedded assets using `static` routes:

0 commit comments

Comments
 (0)