diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 63edb0b..140e0d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,5 +14,5 @@ To test client-side rendering, you can run `cd examples/client && bun install && ## Building -To prepare a new release run `bun dist` which will generate the necessary output files in `/dist`. +To prepare a new release run `bun run build` which will generate the necessary output files in `/dist`. diff --git a/build.ts b/build.ts index 2ac2277..5a6cd58 100644 --- a/build.ts +++ b/build.ts @@ -1,4 +1,9 @@ +import { rm } from 'node:fs/promises'; + async function build() { + // Delete dist folder + await rm('./dist', { force: true, recursive: true }); + // Generate bundle await Bun.build({ entrypoints: ['./src/index.ts'],