@jsnchn/buntastic 0.0.2 → 0.0.4

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 CHANGED
@@ -11,16 +11,28 @@ A simple static site generator built with Bun.
11
11
 
12
12
  ## Installation
13
13
 
14
- ### As a CLI tool (recommended)
14
+ ### Standalone binary (recommended - no dependencies required)
15
+
16
+ Download the latest release for your platform from [GitHub Releases](https://github.com/jsnchn/buntastic/releases):
15
17
 
16
18
  ```bash
17
- # Install Bun (if needed)
18
- curl -fsSL https://bun.sh/install | bash
19
+ # Linux/macOS
20
+ curl -fsSL https://github.com/jsnchn/buntastic/releases/latest/download/buntastic -o buntastic
21
+ chmod +x buntastic
22
+
23
+ # Windows (PowerShell)
24
+ iwr https://github.com/jsnchn/buntastic/releases/latest/download/buntastic.exe -o buntastic.exe
25
+ ```
26
+
27
+ Then run `./buntastic` (or `buntastic.exe` on Windows).
19
28
 
20
- # Install buntastic globally
21
- bun install -g buntastic
29
+ ### With Bun or Node
22
30
 
23
- # Or use npx without installing
31
+ ```bash
32
+ # With bun
33
+ bunx buntastic build
34
+
35
+ # With npx (Node.js)
24
36
  npx buntastic build
25
37
  ```
26
38
 
@@ -31,8 +43,11 @@ npx buntastic build
31
43
  git clone https://github.com/jsnchn/buntastic.git
32
44
  cd buntastic
33
45
 
46
+ # Build the binary
47
+ bun run build:binary
48
+
34
49
  # Start the dev server
35
- bun run dev
50
+ ./buntastic dev
36
51
  ```
37
52
 
38
53
  Visit `http://localhost:3000` to see your site.
@@ -61,8 +76,25 @@ buntastic/
61
76
  | `buntastic build --drafts` | Build with drafts included |
62
77
  | `buntastic dev` | Watch mode + dev server |
63
78
  | `buntastic preview` | Serve the built `dist/` folder |
79
+ | `buntastic init` | Initialize a new project (creates files) |
64
80
 
65
- Or with bun run (if using from source):
81
+ ## File Structure Safety
82
+
83
+ Buntastic commands interact with your project in different ways:
84
+
85
+ | Command | Modifies Source Files? |
86
+ |---------|----------------------|
87
+ | `build` | No - only creates/updates `dist/` |
88
+ | `build --drafts` | No - only creates/updates `dist/` |
89
+ | `dev` | No - only creates/updates `dist/` |
90
+ | `preview` | No - only reads `dist/` |
91
+ | `init` | **Yes** - creates `content/`, `src/layouts/`, `public/`, and `package.json` |
92
+
93
+ **Safe commands** (`build`, `dev`, `preview`) only read from your source files and output to the `dist/` folder. They will not modify your `content/`, `src/layouts/`, `public/`, or `package.json`.
94
+
95
+ **Destructive command** (`init`) creates new files and **will overwrite** an existing `package.json`. Use this only on new projects or when you want to start fresh.
96
+
97
+ Or when using from source with bun:
66
98
 
67
99
  | Command | Description |
68
100
  |---------|-------------|
@@ -70,6 +102,9 @@ Or with bun run (if using from source):
70
102
  | `bun run build:drafts` | Build with drafts included |
71
103
  | `bun run dev` | Watch mode + dev server |
72
104
  | `bun run preview` | Serve the built `dist/` folder |
105
+ | `bun run init` | Initialize a new project (creates files) |
106
+
107
+ Note: When using from source, `bun run dev` internally runs `./buntastic dev` after building.
73
108
 
74
109
  ## Writing Content
75
110
 
@@ -212,11 +247,13 @@ Drafts are included when running `bun run build:drafts`.
212
247
 
213
248
  ## Tech Stack
214
249
 
215
- - [Bun](https://bun.sh) - JavaScript runtime
250
+ - [Bun](https://bun.sh) - Runtime used to build the binary
216
251
  - Bun.markdown - Built-in GFM markdown parser
217
252
  - Bun.serve - HTTP server
218
253
  - Bun.watch - File watching
219
254
 
255
+ The published binary has no runtime dependencies - users don't need Bun or Node.js installed.
256
+
220
257
  ## License
221
258
 
222
259
  MIT
package/buntastic ADDED
Binary file
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@jsnchn/buntastic",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "A simple static site generator built with Bun",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "buntastic": "src/index.ts"
8
8
  },
9
9
  "scripts": {
10
+ "build:binary": "bun build --compile src/index.ts --outfile buntastic",
11
+ "prepublish": "bun build --compile src/index.ts --outfile buntastic",
10
12
  "build": "buntastic build",
11
13
  "build:drafts": "buntastic build --drafts",
12
14
  "dev": "buntastic dev",
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env bun
2
1
  import { mkdir, writeFile, readFile, copyFile, exists } from "fs/promises";
3
2
  import { join, relative, dirname, extname } from "path";
4
3
  import { Glob } from "bun";