This repo contains the @joadr/nx-bun Nx plugin and example apps used to exercise it.
@joadr/nx-bun provides thin Nx executors for Bun workflows.
buildtranspiles Bun entry files or compiles standalone executables.runlaunches Bun scripts or entry files.testrunsbun test.
packages/example-appis the Bun app used as a live consumer example.packages/jsx-example-appis a TSX rendering example without React.packages/jsx-client-example-appis a client-only React example with Bun dev-server HMR.
{
"targets": {
"build": {
"executor": "@joadr/nx-bun:build",
"options": {
"entry": "src/main.ts",
"outputPath": "{workspaceRoot}/dist/apps/example-app"
},
"outputs": ["{workspaceRoot}/dist/apps/example-app"]
}
}
}{
"targets": {
"serve-source": {
"executor": "@joadr/nx-bun:run",
"options": {
"entry": "src/main.ts",
"watch": true
}
}
}
}{
"targets": {
"test": {
"executor": "@joadr/nx-bun:test",
"options": {
"args": ["src/render.test.tsx"]
}
}
}
}- Use
buildto transpile Bun entry files intodist. - Use
runto execute Bun scripts or source files. - Use
testto runbun testfrom Nx.
bun add -d @joadr/nx-bunOr with npm:
npm install -D @joadr/nx-bunThe release workflow publishes @joadr/nx-bun to npm and GitHub Packages, and creates a GitHub Release with notes from the commit history.
For GitHub Actions publishing, use npm Trusted Publishing instead of an NPM_TOKEN secret.
Thanks to Jordan-Hall's nx-bun for inspiring this project.
- ETH:
0xA397c72a9b714A5990C8231388Fc944954D21888 - EVM compatible:
0xA397c72a9b714A5990C8231388Fc944954D21888