bunki 0.1.1 → 0.1.3

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.
Files changed (4) hide show
  1. package/README.md +19 -12
  2. package/dist/cli.js +126 -2163
  3. package/dist/index.js +64 -2100
  4. package/package.json +11 -5
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![GitHub license](https://img.shields.io/github/license/kahwee/bunki)](https://github.com/kahwee/bunki/blob/main/LICENSE)
4
4
  [![GitHub issues](https://img.shields.io/github/issues/kahwee/bunki)](https://github.com/kahwee/bunki/issues)
5
+ [![Coverage Status](https://coveralls.io/repos/github/kahwee/bunki/badge.svg?branch=main)](https://coveralls.io/github/kahwee/bunki?branch=main)
5
6
 
6
7
  Bunki is an opinionated static site generator built with Bun. It's designed for creating blogs and simple websites with sensible defaults and minimal configuration.
7
8
 
@@ -22,6 +23,7 @@ Bunki is an opinionated static site generator built with Bun. It's designed for
22
23
  > **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
 
24
25
  ### Prerequisites
26
+
25
27
  ```bash
26
28
  # Install Bun if you don't have it
27
29
  curl -fsSL https://bun.sh/install | bash
@@ -31,6 +33,7 @@ bun --version
31
33
  ```
32
34
 
33
35
  ### From npm (Coming soon)
36
+
34
37
  ```bash
35
38
  # Install globally
36
39
  bun install -g bunki
@@ -40,6 +43,7 @@ bun install bunki
40
43
  ```
41
44
 
42
45
  ### From GitHub
46
+
43
47
  ```bash
44
48
  # Clone the repository
45
49
  git clone git@github.com:kahwee/bunki.git
@@ -65,6 +69,7 @@ bunki init
65
69
  ```
66
70
 
67
71
  This will:
72
+
68
73
  - Create a default configuration file (`bunki.config.json`)
69
74
  - Set up the required directory structure
70
75
  - Create default templates
@@ -77,7 +82,7 @@ Create markdown files in the `content` directory with frontmatter:
77
82
  ```markdown
78
83
  ---
79
84
  title: Your Post Title
80
- date: 2023-01-01T12:00:00Z
85
+ date: 2025-01-01T12:00:00Z
81
86
  tags: [tag1, tag2]
82
87
  ---
83
88
 
@@ -228,25 +233,25 @@ Options:
228
233
  You can also use Bunki programmatically in your own Bun scripts:
229
234
 
230
235
  ```javascript
231
- import { SiteGenerator, loadConfig } from 'bunki';
232
- import path from 'path';
236
+ import { SiteGenerator, loadConfig } from "bunki";
237
+ import path from "path";
233
238
 
234
239
  // Load configuration
235
- const config = loadConfig('bunki.config.json');
240
+ const config = loadConfig("bunki.config.json");
236
241
 
237
242
  // Create a generator
238
243
  const generator = new SiteGenerator({
239
- contentDir: path.join(process.cwd(), 'content'),
240
- outputDir: path.join(process.cwd(), 'dist'),
241
- templatesDir: path.join(process.cwd(), 'templates'),
242
- config
244
+ contentDir: path.join(process.cwd(), "content"),
245
+ outputDir: path.join(process.cwd(), "dist"),
246
+ templatesDir: path.join(process.cwd(), "templates"),
247
+ config,
243
248
  });
244
249
 
245
250
  // Generate site
246
251
  async function generate() {
247
252
  await generator.initialize();
248
253
  await generator.generate();
249
- console.log('Site generation complete!');
254
+ console.log("Site generation complete!");
250
255
  }
251
256
 
252
257
  generate().catch(console.error);
@@ -272,9 +277,11 @@ bun test utils/markdown
272
277
  bun test --watch
273
278
 
274
279
  # Run tests with coverage
275
- bun test --coverage
280
+ bun test:coverage
276
281
  ```
277
282
 
283
+ Code coverage reports are automatically generated and displayed on GitHub through a badge at the top of this README. You can also view detailed coverage reports on [Coveralls](https://coveralls.io/github/kahwee/bunki).
284
+
278
285
  Tests are written using Bun's native test runner and verify all core functionality of Bunki, including:
279
286
 
280
287
  - Site generation process
@@ -293,7 +300,7 @@ The fixture directory includes:
293
300
  fixtures/
294
301
  ├── bunki.config.json # Test configuration file
295
302
  ├── content/ # Sample markdown content
296
- │ └── 2024/
303
+ │ └── 2025/
297
304
  │ ├── test-post-1.md
298
305
  │ ├── performance-optimization.md
299
306
  │ └── migrating-from-gatsby.md
@@ -311,4 +318,4 @@ You can use these fixtures as examples for your own Bunki projects.
311
318
 
312
319
  ## License
313
320
 
314
- MIT
321
+ MIT