bunki 0.1.0 → 0.1.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 +69 -1
- package/dist/cli.js +30488 -0
- package/dist/index.js +28168 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -19,6 +19,17 @@ Bunki is an opinionated static site generator built with Bun. It's designed for
|
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
|
+
> **IMPORTANT**: Bunki requires Bun v1.2.11 or later as its runtime. It is not compatible with Node.js and will not work with npm, yarn, or pnpm.
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
```bash
|
|
26
|
+
# Install Bun if you don't have it
|
|
27
|
+
curl -fsSL https://bun.sh/install | bash
|
|
28
|
+
|
|
29
|
+
# Verify Bun version (should be 1.2.11 or later)
|
|
30
|
+
bun --version
|
|
31
|
+
```
|
|
32
|
+
|
|
22
33
|
### From npm (Coming soon)
|
|
23
34
|
```bash
|
|
24
35
|
# Install globally
|
|
@@ -214,7 +225,7 @@ Options:
|
|
|
214
225
|
|
|
215
226
|
## Programmatic Usage
|
|
216
227
|
|
|
217
|
-
You can also use Bunki programmatically in your own
|
|
228
|
+
You can also use Bunki programmatically in your own Bun scripts:
|
|
218
229
|
|
|
219
230
|
```javascript
|
|
220
231
|
import { SiteGenerator, loadConfig } from 'bunki';
|
|
@@ -241,6 +252,63 @@ async function generate() {
|
|
|
241
252
|
generate().catch(console.error);
|
|
242
253
|
```
|
|
243
254
|
|
|
255
|
+
> **Note**: Bunki's programmatic API is designed specifically for Bun and utilizes Bun's native APIs for optimal performance. It will not work in Node.js environments.
|
|
256
|
+
|
|
257
|
+
## Development
|
|
258
|
+
|
|
259
|
+
### Testing
|
|
260
|
+
|
|
261
|
+
Bunki includes a comprehensive test suite to verify functionality:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# Run all tests
|
|
265
|
+
bun test
|
|
266
|
+
|
|
267
|
+
# Run specific test files
|
|
268
|
+
bun test site-generator
|
|
269
|
+
bun test utils/markdown
|
|
270
|
+
|
|
271
|
+
# Run tests with watch mode
|
|
272
|
+
bun test --watch
|
|
273
|
+
|
|
274
|
+
# Run tests with coverage
|
|
275
|
+
bun test --coverage
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Tests are written using Bun's native test runner and verify all core functionality of Bunki, including:
|
|
279
|
+
|
|
280
|
+
- Site generation process
|
|
281
|
+
- Markdown parsing and rendering
|
|
282
|
+
- Configuration handling
|
|
283
|
+
- File system utilities
|
|
284
|
+
- Template rendering
|
|
285
|
+
|
|
286
|
+
### Test Fixtures
|
|
287
|
+
|
|
288
|
+
Bunki comes with a set of test fixtures that are used by the test suite and can also serve as examples:
|
|
289
|
+
|
|
290
|
+
The fixture directory includes:
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
fixtures/
|
|
294
|
+
├── bunki.config.json # Test configuration file
|
|
295
|
+
├── content/ # Sample markdown content
|
|
296
|
+
│ └── 2024/
|
|
297
|
+
│ ├── test-post-1.md
|
|
298
|
+
│ ├── performance-optimization.md
|
|
299
|
+
│ └── migrating-from-gatsby.md
|
|
300
|
+
├── src/
|
|
301
|
+
│ └── tags.toml # Tag definitions
|
|
302
|
+
└── templates/ # Test templates
|
|
303
|
+
├── base.njk
|
|
304
|
+
├── index.njk
|
|
305
|
+
├── post.njk
|
|
306
|
+
└── styles/
|
|
307
|
+
└── main.css
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
You can use these fixtures as examples for your own Bunki projects.
|
|
311
|
+
|
|
244
312
|
## License
|
|
245
313
|
|
|
246
314
|
MIT
|