https://github.com/arshad-yaseen/bunup
Bundling your Javascript or TypeScript libraries has never been simpler or faster—thanks to Bun.
https://github.com/arshad-yaseen/bunup
build-tool bun bundler typescript
Last synced: over 1 year ago
JSON representation
Bundling your Javascript or TypeScript libraries has never been simpler or faster—thanks to Bun.
- Host: GitHub
- URL: https://github.com/arshad-yaseen/bunup
- Owner: arshad-yaseen
- License: mit
- Created: 2025-03-13T18:27:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T20:12:11.000Z (over 1 year ago)
- Last Synced: 2025-03-17T21:25:43.944Z (over 1 year ago)
- Topics: build-tool, bun, bundler, typescript
- Language: TypeScript
- Homepage: https://bunup.arshadyaseen.com
- Size: 951 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

## Benchmarks
Bunup outperforms other popular bundlers by a significant margin:
| Bundler | Format | Build Time | Relative Speed |
| ------------- | -------- | ----------- | ---------------- |
| bunup | esm, cjs | **3.65ms** | **16.0x faster** |
| bunup (+ dts) | esm, cjs | **36.44ms** | **20.4x faster** |
| tsup | esm, cjs | 58.36ms | baseline |
| tsup (+ dts) | esm, cjs | 745.23ms | baseline |
_Lower build time is better. Benchmark run on the same code with identical output formats._
## Prerequisites
Bunup requires [Bun](https://bun.sh) to be installed on your system. Bun is a fast all-in-one JavaScript runtime that powers Bunup's exceptional performance. Without Bun, Bunup cannot execute as it leverages Bun's bundling capabilities and runtime environment.
To install Bun, please visit the [official Bun installation page](https://bun.sh/docs/installation).
## Quick Start
### Installation
```bash
npm install --save-dev bunup
```
### Basic Usage
Create a simple TypeScript file:
```typescript
// src/index.ts
export function greet(name: string): string {
return `Hello, ${name}!`;
}
```
Bundle it with bunup:
```bash
bunup src/index.ts
```
This will create a bundled output in the `dist` directory.
### Using with package.json
Add a build script to your `package.json`:
```json
{
"name": "my-package",
"scripts": {
"build": "bunup src/index.ts --format esm,cjs --dts"
}
}
```
Then run:
```bash
npm run build
```
### Configuration File
Create a `bunup.config.ts` file for more control:
```typescript
import {defineConfig} from 'bunup';
export default defineConfig({
entry: ['src/index.ts'],
outDir: 'dist',
format: ['esm', 'cjs'],
dts: true,
minify: true,
});
```
## Documentation
For complete documentation, visit [the full documentation](https://bunup.arshadyaseen.com/).
## Contributing
For guidelines on contributing, please read the [contributing guide](https://github.com/arshad-yaseen/bunup/blob/main/CONTRIBUTING.md).
We welcome contributions from the community to enhance Bunup's capabilities and make it even more powerful. ❤️