-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add banner, .d.ts, cli, make sourcemap compat, and add tests + docs (#…
- Loading branch information
Showing
9 changed files
with
95 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { describe } from "bun:test"; | ||
import { itBundled } from "./expectBundled"; | ||
|
||
describe("bundler", () => { | ||
itBundled("banner/CommentBanner", { | ||
banner: "// developed with love in SF", | ||
files: { | ||
"/a.js": `console.log("Hello, world!")`, | ||
}, | ||
onAfterBundle(api) { | ||
api.expectFile("out.js").toContain("// developed with love in SF"); | ||
}, | ||
}); | ||
itBundled("banner/MultilineBanner", { | ||
banner: `"use client"; | ||
// This is a multiline banner | ||
// It can contain multiple lines of comments or code`, | ||
files: { | ||
/* js*/ "index.js": `console.log("Hello, world!")`, | ||
}, | ||
onAfterBundle(api) { | ||
api.expectFile("out.js").toContain(`"use client"; | ||
// This is a multiline banner | ||
// It can contain multiple lines of comments or code`); | ||
}, | ||
}); | ||
itBundled("banner/UseClientBanner", { | ||
banner: '"use client";', | ||
files: { | ||
/* js*/ "index.js": `console.log("Hello, world!")`, | ||
}, | ||
onAfterBundle(api) { | ||
api.expectFile("out.js").toContain('"use client";'); | ||
}, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters