bunup 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -7
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
A extremely fast, zero-config bundler for TypeScript & JavaScript, powered by [Bun](https://bun.sh) and [oxc](https://oxc.rs/).
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
> Built with speed in mind, Bunup aims to provide the fastest bundling experience possible. This project is currently a work in progress and will be ready for production use soon.
|
|
1
|
+

|
|
8
2
|
|
|
9
3
|
## Benchmarks
|
|
10
4
|
|
|
@@ -18,3 +12,81 @@ Bunup outperforms other popular bundlers by a significant margin:
|
|
|
18
12
|
| tsup (+ dts) | esm, cjs | 745.23ms | baseline |
|
|
19
13
|
|
|
20
14
|
_Lower build time is better. Benchmark run on the same code with identical output formats._
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
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.
|
|
19
|
+
|
|
20
|
+
To install Bun, please visit the [official Bun installation page](https://bun.sh/docs/installation).
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install --save-dev bunup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Basic Usage
|
|
31
|
+
|
|
32
|
+
Create a simple TypeScript file:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// src/index.ts
|
|
36
|
+
export function greet(name: string): string {
|
|
37
|
+
return `Hello, ${name}!`;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Bundle it with bunup:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bunup src/index.ts
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This will create a bundled output in the `dist` directory.
|
|
48
|
+
|
|
49
|
+
### Using with package.json
|
|
50
|
+
|
|
51
|
+
Add a build script to your `package.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"name": "my-package",
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "bunup src/index.ts --format esm,cjs --dts"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then run:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Configuration File
|
|
69
|
+
|
|
70
|
+
Create a `bunup.config.ts` file for more control:
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import {defineConfig} from 'bunup';
|
|
74
|
+
|
|
75
|
+
export default defineConfig({
|
|
76
|
+
entry: ['src/index.ts'],
|
|
77
|
+
outDir: 'dist',
|
|
78
|
+
format: ['esm', 'cjs'],
|
|
79
|
+
dts: true,
|
|
80
|
+
minify: true,
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
For complete documentation, visit [the full documentation](https://bunup.arshadyaseen.com/).
|
|
87
|
+
|
|
88
|
+
## Contributing
|
|
89
|
+
|
|
90
|
+
For guidelines on contributing, please read the [contributing guide](https://github.com/arshad-yaseen/bunup/blob/main/CONTRIBUTING.md).
|
|
91
|
+
|
|
92
|
+
We welcome contributions from the community to enhance Bunup's capabilities and make it even more powerful. ❤️
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunup",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.29",
|
|
4
|
+
"description": "An extremely fast, zero-config bundler for TypeScript & JavaScript, powered by Bun.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"module": "./build/index.mjs",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/bun": "^1.2.5",
|
|
19
19
|
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
20
20
|
"bumpp": "^10.1.0",
|
|
21
|
-
"bunup": "^0.1.
|
|
21
|
+
"bunup": "^0.1.27",
|
|
22
22
|
"eslint": "^8.57.0",
|
|
23
23
|
"husky": "^9.1.6",
|
|
24
24
|
"prettier": "^3.2.5",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"type": "git",
|
|
43
43
|
"url": "git+https://github.com/arshad-yaseen/bunup.git"
|
|
44
44
|
},
|
|
45
|
+
"homepage": "https://bunup.arshadyaseen.com",
|
|
45
46
|
"maintainers": [
|
|
46
47
|
{
|
|
47
48
|
"name": "Arshad Yaseen",
|