$ bun build fmt.js --no-bundle | bun -e 'Bun.write(Bun.file("fmt.js"), await Bun.file("/dev/stdin").text())'
Last active
August 31, 2024 03:25
-
-
Save guest271314/f36fb20cc957bbf7ff60a8a126c891e6 to your computer and use it in GitHub Desktop.
Bun code formatter using bun build and bun -e
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
// bun run fmt.js gist-plugin.js | |
import { $ } from "bun"; | |
const file = Bun.argv.at(-1); | |
await Bun.write(file, await $`bun build ${file} --no-bundle`.text()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment