bunki 0.2.5 โ 0.3.1
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 +468 -66
- package/dist/cli.js +11195 -15108
- package/dist/fsevents-hj42pnne.node +0 -0
- package/dist/index.js +21634 -25922
- package/package.json +46 -10
package/README.md
CHANGED
|
@@ -1,26 +1,258 @@
|
|
|
1
1
|
# Bunki
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
# Bunki
|
|
4
|
+
|
|
5
|
+
Fast static site generator for blogs/docs built with Bun. Core features: Markdown + frontmatter, tags, year archives, pagination, RSS, sitemap, secure sanitized HTML, syntax highlighting, optional PostCSS pipeline, image uploading (S3/R2), tiny Nunjucks templates.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun install bunki # add locally
|
|
11
|
+
bun install -g bunki # or global
|
|
12
|
+
npm i bunki # Node (>=18)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Bun >= 1.2.20 (recommended runtime).
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bunki init
|
|
21
|
+
bunki new "Hello World" --tags web,notes
|
|
22
|
+
bunki generate
|
|
23
|
+
bunki serve # http://localhost:3000
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Minimal Config (bunki.config.ts)
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { SiteConfig } from "bunki";
|
|
30
|
+
export default (): SiteConfig => ({
|
|
31
|
+
title: "My Blog",
|
|
32
|
+
description: "Thoughts",
|
|
33
|
+
baseUrl: "https://example.com",
|
|
34
|
+
domain: "example.com",
|
|
35
|
+
css: {
|
|
36
|
+
input: "templates/styles/main.css",
|
|
37
|
+
output: "css/style.css",
|
|
38
|
+
postcssConfig: "postcss.config.js",
|
|
39
|
+
enabled: true,
|
|
40
|
+
}, // optional
|
|
41
|
+
s3: {
|
|
42
|
+
// optional image upload
|
|
43
|
+
accessKeyId: process.env.R2_ACCESS_KEY_ID || "",
|
|
44
|
+
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY || "",
|
|
45
|
+
bucket: process.env.R2_BUCKET || "",
|
|
46
|
+
endpoint: process.env.R2_ENDPOINT,
|
|
47
|
+
region: process.env.R2_REGION || "auto",
|
|
48
|
+
publicUrl: process.env.R2_PUBLIC_URL || "",
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Frontmatter
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
---
|
|
57
|
+
title: "Post Title"
|
|
58
|
+
date: 2025-01-15T09:00:00-07:00
|
|
59
|
+
tags: [web, performance]
|
|
60
|
+
excerpt: Optional summary
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Optional tag descriptions: `src/tags.toml`:
|
|
65
|
+
|
|
66
|
+
```toml
|
|
67
|
+
performance = "Speed & optimization"
|
|
68
|
+
web = "General web dev"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## CSS (Tailwind example)
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun add -D tailwindcss @tailwindcss/postcss @tailwindcss/typography
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`postcss.config.js`:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
module.exports = { plugins: [require("@tailwindcss/postcss")] };
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`templates/styles/main.css`:
|
|
84
|
+
|
|
85
|
+
```css
|
|
86
|
+
@tailwind base;
|
|
87
|
+
@tailwind components;
|
|
88
|
+
@tailwind utilities;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Processed automatically during `bunki generate`.
|
|
92
|
+
|
|
93
|
+
## Images
|
|
94
|
+
|
|
95
|
+
Env vars (R2 / S3):
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
R2_ACCESS_KEY_ID=...
|
|
99
|
+
R2_SECRET_ACCESS_KEY=...
|
|
100
|
+
R2_BUCKET=...
|
|
101
|
+
R2_ENDPOINT=...
|
|
102
|
+
R2_PUBLIC_URL=https://cdn.example.com
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Upload:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
bunki images:push --images ./images --output-json image-map.json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Programmatic
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
import { SiteGenerator, loadConfig } from "bunki";
|
|
115
|
+
const cfg = await loadConfig("./bunki.config.ts");
|
|
116
|
+
const gen = new SiteGenerator({
|
|
117
|
+
contentDir: "content",
|
|
118
|
+
outputDir: "dist",
|
|
119
|
+
templatesDir: "templates",
|
|
120
|
+
config: cfg,
|
|
121
|
+
});
|
|
122
|
+
await gen.initialize();
|
|
123
|
+
await gen.generate();
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## CLI
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
init | new | generate | serve | images:push | css
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Output
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
- ๐ฑ **Mobile-first** responsive templates
|
|
136
|
+
index.html
|
|
137
|
+
feed.xml
|
|
138
|
+
sitemap.xml
|
|
139
|
+
2025/... per-post dirs
|
|
140
|
+
tags/... tag pages
|
|
141
|
+
css/style.css (if enabled)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Security
|
|
145
|
+
|
|
146
|
+
HTML sanitized; external links hardened; unsafe tags stripped.
|
|
147
|
+
|
|
148
|
+
## Changelog
|
|
149
|
+
|
|
150
|
+
v0.3.1 (this release)
|
|
151
|
+
|
|
152
|
+
- Export map + sideEffects=false for tree-shaking
|
|
153
|
+
- Prepack build cleanup
|
|
154
|
+
- Concise docs & publish prep
|
|
155
|
+
|
|
156
|
+
v0.3.0
|
|
157
|
+
|
|
158
|
+
- PostCSS pipeline + `css` command
|
|
159
|
+
|
|
160
|
+
## Contribute
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
bun install
|
|
164
|
+
bun run build
|
|
165
|
+
bun test
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT ยฉ KahWee Teng
|
|
171
|
+
|
|
172
|
+
- โก **Simple CLI interface** with intuitive commands
|
|
173
|
+
|
|
174
|
+
## ๐ ๏ธ PostCSS Integration
|
|
175
|
+
|
|
176
|
+
Bunki v0.3.0+ includes built-in PostCSS processing, allowing you to use modern CSS frameworks like Tailwind CSS while keeping framework-specific dependencies in your project:
|
|
177
|
+
|
|
178
|
+
### CSS Configuration
|
|
179
|
+
|
|
180
|
+
Configure CSS processing in your `bunki.config.ts`:
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
export default function (): SiteConfig {
|
|
184
|
+
return {
|
|
185
|
+
title: "My Blog",
|
|
186
|
+
description: "A blog built with Bunki",
|
|
187
|
+
baseUrl: "https://example.com",
|
|
188
|
+
domain: "blog",
|
|
189
|
+
// CSS processing configuration
|
|
190
|
+
css: {
|
|
191
|
+
input: "templates/styles/main.css", // Input CSS file
|
|
192
|
+
output: "css/style.css", // Output path in dist
|
|
193
|
+
postcssConfig: "postcss.config.js", // PostCSS config file
|
|
194
|
+
enabled: true, // Enable CSS processing
|
|
195
|
+
watch: false, // Watch for changes (dev mode)
|
|
196
|
+
},
|
|
197
|
+
// ... other config
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### CSS Processing Commands
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Process CSS as part of site generation
|
|
206
|
+
bunki generate
|
|
207
|
+
|
|
208
|
+
# Process CSS standalone
|
|
209
|
+
bunki css
|
|
5
210
|
|
|
6
|
-
|
|
211
|
+
# Watch CSS files for changes (development)
|
|
212
|
+
bunki css --watch
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Framework Integration Example (Tailwind CSS)
|
|
216
|
+
|
|
217
|
+
1. **Install Tailwind in your project** (not in bunki):
|
|
7
218
|
|
|
8
|
-
|
|
219
|
+
```bash
|
|
220
|
+
bun add -D tailwindcss @tailwindcss/postcss @tailwindcss/typography
|
|
221
|
+
```
|
|
9
222
|
|
|
10
|
-
|
|
11
|
-
- Syntax highlighting for code blocks
|
|
12
|
-
- Tag-based organization
|
|
13
|
-
- Year-based archives
|
|
14
|
-
- Pagination for post listings
|
|
15
|
-
- RSS feed generation
|
|
16
|
-
- Sitemap generation
|
|
17
|
-
- Local development server
|
|
18
|
-
- Simple CLI interface
|
|
19
|
-
- Cloud image uploading (Cloudflare R2, S3)
|
|
223
|
+
2. **Create `postcss.config.js`**:
|
|
20
224
|
|
|
21
|
-
|
|
225
|
+
```javascript
|
|
226
|
+
module.exports = {
|
|
227
|
+
plugins: [require("@tailwindcss/postcss")],
|
|
228
|
+
};
|
|
229
|
+
```
|
|
22
230
|
|
|
23
|
-
|
|
231
|
+
3. **Create `tailwind.config.js`**:
|
|
232
|
+
|
|
233
|
+
```javascript
|
|
234
|
+
module.exports = {
|
|
235
|
+
content: ["./content/**/*.{md,mdx}", "./templates/**/*.{njk,html}"],
|
|
236
|
+
theme: {
|
|
237
|
+
extend: {},
|
|
238
|
+
},
|
|
239
|
+
plugins: [require("@tailwindcss/typography")],
|
|
240
|
+
};
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
4. **Create your CSS file** (`templates/styles/main.css`):
|
|
244
|
+
|
|
245
|
+
```css
|
|
246
|
+
@tailwind base;
|
|
247
|
+
@tailwind components;
|
|
248
|
+
@tailwind utilities;
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Bunki will process your CSS through PostCSS and Tailwind, generating optimized output in your `dist` directory.
|
|
252
|
+
|
|
253
|
+
## ๐ฆ Installation
|
|
254
|
+
|
|
255
|
+
> **IMPORTANT**: Bunki requires Bun v1.2.20 or later as its runtime. It also works with Node.js v18+ but Bun is recommended for optimal performance.
|
|
24
256
|
|
|
25
257
|
### Prerequisites
|
|
26
258
|
|
|
@@ -28,20 +260,25 @@ Bunki is an opinionated static site generator built with Bun. It's designed for
|
|
|
28
260
|
# Install Bun if you don't have it
|
|
29
261
|
curl -fsSL https://bun.sh/install | bash
|
|
30
262
|
|
|
31
|
-
# Verify Bun version (should be 1.2.
|
|
263
|
+
# Verify Bun version (should be 1.2.20 or later)
|
|
32
264
|
bun --version
|
|
33
265
|
```
|
|
34
266
|
|
|
35
267
|
### Installation Options
|
|
36
268
|
|
|
37
269
|
```bash
|
|
38
|
-
# Install globally
|
|
270
|
+
# Install globally with Bun
|
|
39
271
|
bun install -g bunki
|
|
40
272
|
|
|
273
|
+
# Or with npm
|
|
274
|
+
npm install -g bunki
|
|
275
|
+
|
|
41
276
|
# Or install locally in your project
|
|
42
277
|
bun install bunki
|
|
278
|
+
# or
|
|
279
|
+
npm install bunki
|
|
43
280
|
|
|
44
|
-
# Or from GitHub
|
|
281
|
+
# Or from GitHub for development
|
|
45
282
|
git clone git@github.com:kahwee/bunki.git
|
|
46
283
|
cd bunki
|
|
47
284
|
bun install
|
|
@@ -49,39 +286,53 @@ bun run build
|
|
|
49
286
|
bun link
|
|
50
287
|
```
|
|
51
288
|
|
|
52
|
-
## Quick Start
|
|
289
|
+
## ๐ Quick Start
|
|
53
290
|
|
|
54
291
|
### Initialize a New Site
|
|
55
292
|
|
|
56
293
|
```bash
|
|
57
294
|
# Create a new site with default templates and configuration
|
|
58
295
|
bunki init
|
|
296
|
+
|
|
297
|
+
# This creates:
|
|
298
|
+
# - bunki.config.ts (configuration)
|
|
299
|
+
# - content/ (for markdown posts)
|
|
300
|
+
# - templates/ (Nunjucks templates)
|
|
301
|
+
# - public/ (static assets)
|
|
59
302
|
```
|
|
60
303
|
|
|
61
304
|
### Add Content
|
|
62
305
|
|
|
63
306
|
Create markdown files in the `content` directory with frontmatter:
|
|
64
307
|
|
|
65
|
-
|
|
308
|
+
````markdown
|
|
66
309
|
---
|
|
67
310
|
title: Your Post Title
|
|
68
311
|
date: 2025-01-01T09:00:00-07:00
|
|
69
|
-
tags: [
|
|
312
|
+
tags: [web-development, javascript]
|
|
70
313
|
---
|
|
71
314
|
|
|
72
|
-
Your
|
|
315
|
+
# Your Post Title
|
|
316
|
+
|
|
317
|
+
Your post content goes here with **markdown** support!
|
|
318
|
+
|
|
319
|
+
```javascript
|
|
320
|
+
console.log("Code highlighting works too!");
|
|
73
321
|
```
|
|
322
|
+
````
|
|
323
|
+
|
|
324
|
+
````
|
|
74
325
|
|
|
75
326
|
Or use the CLI to create a new post:
|
|
76
327
|
|
|
77
328
|
```bash
|
|
78
|
-
bunki new "Your Post Title" --tags "
|
|
79
|
-
|
|
329
|
+
bunki new "Your Post Title" --tags "web-development, javascript"
|
|
330
|
+
````
|
|
80
331
|
|
|
81
332
|
### Generate Your Site
|
|
82
333
|
|
|
83
334
|
```bash
|
|
84
|
-
# Generate the static site
|
|
335
|
+
# Generate the static site (includes CSS processing)
|
|
85
336
|
bunki generate
|
|
86
337
|
```
|
|
87
338
|
|
|
@@ -90,9 +341,12 @@ bunki generate
|
|
|
90
341
|
```bash
|
|
91
342
|
# Start a local development server
|
|
92
343
|
bunki serve
|
|
344
|
+
|
|
345
|
+
# Custom port
|
|
346
|
+
bunki serve --port 3000
|
|
93
347
|
```
|
|
94
348
|
|
|
95
|
-
## Configuration
|
|
349
|
+
## โ๏ธ Configuration
|
|
96
350
|
|
|
97
351
|
The `bunki.config.ts` file contains the configuration for your site:
|
|
98
352
|
|
|
@@ -109,102 +363,250 @@ export default function (): SiteConfig {
|
|
|
109
363
|
description: "A blog built with Bunki",
|
|
110
364
|
baseUrl: "https://example.com",
|
|
111
365
|
domain: "blog",
|
|
112
|
-
|
|
366
|
+
|
|
367
|
+
// CSS processing configuration
|
|
368
|
+
css: {
|
|
369
|
+
input: "templates/styles/main.css",
|
|
370
|
+
output: "css/style.css",
|
|
371
|
+
postcssConfig: "postcss.config.js",
|
|
372
|
+
enabled: true,
|
|
373
|
+
watch: false,
|
|
374
|
+
},
|
|
375
|
+
|
|
376
|
+
// Cloud storage configuration for images
|
|
377
|
+
publicUrl: process.env.R2_PUBLIC_URL,
|
|
113
378
|
s3: {
|
|
114
379
|
accessKeyId: process.env.R2_ACCESS_KEY_ID || "",
|
|
115
380
|
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY || "",
|
|
116
381
|
bucket: process.env.R2_BUCKET || "",
|
|
117
382
|
endpoint: process.env.R2_ENDPOINT,
|
|
118
383
|
region: process.env.R2_REGION || "auto",
|
|
119
|
-
publicUrl: process.env.R2_PUBLIC_URL || "",
|
|
120
384
|
},
|
|
121
385
|
};
|
|
122
386
|
}
|
|
123
387
|
```
|
|
124
388
|
|
|
125
|
-
## Image
|
|
389
|
+
## ๐ผ๏ธ Image Management
|
|
126
390
|
|
|
127
391
|
Bunki uses Bun's native S3 API for efficient image uploads to S3-compatible services like Cloudflare R2.
|
|
128
392
|
|
|
129
|
-
|
|
393
|
+
### Environment Configuration
|
|
130
394
|
|
|
131
|
-
|
|
395
|
+
Create a `.env` file with your storage credentials:
|
|
396
|
+
|
|
397
|
+
```env
|
|
132
398
|
R2_ACCOUNT_ID=your-account-id
|
|
133
399
|
R2_ACCESS_KEY_ID=your-access-key
|
|
134
400
|
R2_SECRET_ACCESS_KEY=your-secret-key
|
|
135
401
|
R2_BUCKET=your-bucket
|
|
136
|
-
R2_PUBLIC_URL=https://your-
|
|
402
|
+
R2_PUBLIC_URL=https://your-cdn-url.com
|
|
137
403
|
```
|
|
138
404
|
|
|
139
405
|
For domain-specific custom domains:
|
|
140
406
|
|
|
141
|
-
```
|
|
407
|
+
```env
|
|
142
408
|
R2_CUSTOM_DOMAIN_EXAMPLE_COM=cdn.example.com
|
|
143
409
|
```
|
|
144
410
|
|
|
145
|
-
###
|
|
411
|
+
### Upload Commands
|
|
146
412
|
|
|
147
413
|
```bash
|
|
148
|
-
# Upload all images
|
|
414
|
+
# Upload all images from the images/ directory
|
|
149
415
|
bunki images:push
|
|
150
416
|
|
|
151
417
|
# Specify a different images directory
|
|
152
418
|
bunki images:push --images path/to/images
|
|
153
419
|
|
|
154
|
-
# Output URL mapping to a JSON file
|
|
420
|
+
# Output URL mapping to a JSON file for reference
|
|
155
421
|
bunki images:push --output-json image-urls.json
|
|
422
|
+
|
|
423
|
+
# Upload for a specific domain
|
|
424
|
+
bunki images:push --domain example.com
|
|
156
425
|
```
|
|
157
426
|
|
|
158
|
-
|
|
427
|
+
Supported formats: **JPG**, **PNG**, **GIF**, **WebP**, **SVG**
|
|
159
428
|
|
|
160
|
-
## Directory Structure
|
|
429
|
+
## ๐ Directory Structure
|
|
161
430
|
|
|
162
431
|
```
|
|
163
|
-
|
|
164
|
-
โโโ bunki.config.ts
|
|
165
|
-
โโโ
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
โโโ
|
|
169
|
-
โ
|
|
170
|
-
โ
|
|
171
|
-
โ
|
|
172
|
-
|
|
173
|
-
โ โโโ
|
|
174
|
-
โ โโโ
|
|
175
|
-
โ
|
|
176
|
-
โ
|
|
177
|
-
โโโ
|
|
178
|
-
|
|
432
|
+
my-blog/
|
|
433
|
+
โโโ bunki.config.ts # Site configuration
|
|
434
|
+
โโโ postcss.config.js # PostCSS configuration (optional)
|
|
435
|
+
โโโ tailwind.config.js # Tailwind config (if using Tailwind)
|
|
436
|
+
โโโ .env # Environment variables
|
|
437
|
+
โโโ content/ # Markdown content
|
|
438
|
+
โ โโโ 2025/ # Year-based organization
|
|
439
|
+
โ โโโ my-first-post.md
|
|
440
|
+
โ โโโ another-post.md
|
|
441
|
+
โโโ templates/ # Nunjucks templates
|
|
442
|
+
โ โโโ base.njk # Base layout
|
|
443
|
+
โ โโโ index.njk # Homepage
|
|
444
|
+
โ โโโ post.njk # Post template
|
|
445
|
+
โ โโโ tag.njk # Tag page
|
|
446
|
+
โ โโโ tags.njk # Tags index
|
|
447
|
+
โ โโโ archive.njk # Year archive
|
|
448
|
+
โ โโโ styles/ # CSS source files
|
|
449
|
+
โ โโโ main.css # Main stylesheet
|
|
450
|
+
โโโ images/ # Local images (uploaded to cloud)
|
|
451
|
+
โโโ public/ # Static assets (copied to dist)
|
|
452
|
+
โโโ src/ # Tag descriptions
|
|
453
|
+
โ โโโ tags.toml # Tag metadata
|
|
454
|
+
โโโ dist/ # Generated site (output)
|
|
455
|
+
โโโ index.html
|
|
456
|
+
โโโ css/
|
|
457
|
+
โ โโโ style.css # Processed CSS
|
|
458
|
+
โโโ 2025/
|
|
459
|
+
โ โโโ my-first-post/
|
|
460
|
+
โ โโโ index.html
|
|
461
|
+
โโโ tags/
|
|
462
|
+
โโโ feed.xml # RSS feed
|
|
463
|
+
โโโ sitemap.xml # Sitemap
|
|
179
464
|
```
|
|
180
465
|
|
|
181
|
-
## CLI Commands
|
|
466
|
+
## ๐จ CLI Commands
|
|
182
467
|
|
|
183
|
-
```
|
|
468
|
+
```bash
|
|
184
469
|
Usage: bunki [options] [command]
|
|
185
470
|
|
|
186
471
|
Commands:
|
|
187
|
-
init [options]
|
|
188
|
-
new [options] <title>
|
|
189
|
-
generate [options]
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
472
|
+
init [options] Initialize a new site with templates
|
|
473
|
+
new [options] <title> Create a new blog post
|
|
474
|
+
generate [options] Generate static site from content
|
|
475
|
+
css [options] Process CSS using PostCSS
|
|
476
|
+
serve [options] Start local development server
|
|
477
|
+
images:push [options] Upload images to cloud storage
|
|
478
|
+
help [command] Display help for command
|
|
479
|
+
|
|
480
|
+
Options:
|
|
481
|
+
-V, --version Display version number
|
|
482
|
+
-h, --help Display help for command
|
|
193
483
|
```
|
|
194
484
|
|
|
195
|
-
|
|
485
|
+
### Detailed Command Options
|
|
196
486
|
|
|
197
487
|
```bash
|
|
488
|
+
# Initialize new site
|
|
489
|
+
bunki init --config custom.config.ts
|
|
490
|
+
|
|
491
|
+
# Create new post
|
|
492
|
+
bunki new "My Post Title" --tags "javascript, web-dev"
|
|
493
|
+
|
|
494
|
+
# Generate with custom options
|
|
495
|
+
bunki generate --config bunki.config.ts --output dist
|
|
496
|
+
|
|
497
|
+
# CSS processing
|
|
498
|
+
bunki css --watch # Watch for changes
|
|
499
|
+
bunki css --output dist # Custom output directory
|
|
500
|
+
|
|
501
|
+
# Development server
|
|
502
|
+
bunki serve --port 3000 # Custom port
|
|
503
|
+
bunki serve --output dist # Serve from custom directory
|
|
504
|
+
|
|
505
|
+
# Image upload
|
|
506
|
+
bunki images:push --domain example.com
|
|
507
|
+
bunki images:push --images custom/path --output-json mapping.json
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
## ๐๏ธ Development
|
|
511
|
+
|
|
512
|
+
### Prerequisites for Contributors
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
git clone git@github.com:kahwee/bunki.git
|
|
516
|
+
cd bunki
|
|
517
|
+
bun install
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Development Commands
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
# Build the project
|
|
524
|
+
bun run build
|
|
525
|
+
|
|
526
|
+
# Run in development mode with watch
|
|
527
|
+
bun run dev
|
|
528
|
+
|
|
198
529
|
# Run tests
|
|
199
530
|
bun test
|
|
200
531
|
|
|
201
532
|
# Run tests with coverage
|
|
202
533
|
bun test:coverage
|
|
203
534
|
|
|
535
|
+
# Watch tests
|
|
536
|
+
bun test:watch
|
|
537
|
+
|
|
204
538
|
# Type checking
|
|
205
539
|
bun run typecheck
|
|
540
|
+
|
|
541
|
+
# Format code
|
|
542
|
+
bun run format
|
|
543
|
+
|
|
544
|
+
# Clean build artifacts
|
|
545
|
+
bun run clean
|
|
206
546
|
```
|
|
207
547
|
|
|
208
|
-
|
|
548
|
+
### Project Structure
|
|
549
|
+
|
|
550
|
+
```
|
|
551
|
+
bunki/
|
|
552
|
+
โโโ src/
|
|
553
|
+
โ โโโ cli.ts # CLI interface
|
|
554
|
+
โ โโโ config.ts # Configuration management
|
|
555
|
+
โ โโโ site-generator.ts # Core site generation
|
|
556
|
+
โ โโโ server.ts # Development server
|
|
557
|
+
โ โโโ parser.ts # Markdown parsing
|
|
558
|
+
โ โโโ types.ts # TypeScript types
|
|
559
|
+
โ โโโ utils/
|
|
560
|
+
โ โโโ css-processor.ts # PostCSS integration
|
|
561
|
+
โ โโโ file-utils.ts # File operations
|
|
562
|
+
โ โโโ image-uploader.ts # Image cloud upload
|
|
563
|
+
โ โโโ markdown-utils.ts # Markdown processing
|
|
564
|
+
โ โโโ s3-uploader.ts # S3 API client
|
|
565
|
+
โโโ test/ # Test files
|
|
566
|
+
โโโ fixtures/ # Test fixtures
|
|
567
|
+
โโโ dist/ # Built output
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
## ๐ Changelog
|
|
571
|
+
|
|
572
|
+
### v0.3.0 (Latest)
|
|
573
|
+
|
|
574
|
+
- โจ **NEW**: PostCSS integration with configurable CSS processing
|
|
575
|
+
- โจ **NEW**: CSS watch mode for development
|
|
576
|
+
- โจ **NEW**: Framework-agnostic CSS support (Tailwind, etc.)
|
|
577
|
+
- ๐ **IMPROVED**: Enhanced CLI with `css` command
|
|
578
|
+
- ๐ **IMPROVED**: Better error handling and fallbacks
|
|
579
|
+
- ๐ **FIXED**: Directory existence validation for development server
|
|
580
|
+
- ๐ **DOCS**: Comprehensive PostCSS integration guide
|
|
581
|
+
|
|
582
|
+
### v0.2.6
|
|
583
|
+
|
|
584
|
+
- ๐ **FIXED**: Server directory existence check
|
|
585
|
+
- ๐ **IMPROVED**: Error handling and logging
|
|
586
|
+
- ๐ **DOCS**: Enhanced documentation
|
|
587
|
+
|
|
588
|
+
## ๐ค Contributing
|
|
589
|
+
|
|
590
|
+
Contributions are welcome! Please read our contributing guidelines and feel free to submit issues and pull requests.
|
|
591
|
+
|
|
592
|
+
### Areas for Contribution
|
|
593
|
+
|
|
594
|
+
- ๐ Bug fixes and improvements
|
|
595
|
+
- ๐ Documentation improvements
|
|
596
|
+
- ๐งช Additional test coverage
|
|
597
|
+
- โจ New features (CSS plugins, template engines, etc.)
|
|
598
|
+
- ๐จ Template improvements
|
|
599
|
+
|
|
600
|
+
## ๐ License
|
|
601
|
+
|
|
602
|
+
MIT ยฉ [KahWee Teng](https://github.com/kahwee)
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
## ๐โโ๏ธ Support
|
|
607
|
+
|
|
608
|
+
- ๐ [Documentation](https://github.com/kahwee/bunki)
|
|
609
|
+
- ๐ [Issues](https://github.com/kahwee/bunki/issues)
|
|
610
|
+
- ๐ฌ [Discussions](https://github.com/kahwee/bunki/discussions)
|
|
209
611
|
|
|
210
|
-
|
|
612
|
+
Built with โค๏ธ using [Bun](https://bun.sh)
|