sakuga 0.0.1 → 0.0.2
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 +42 -1
- package/bin/sakuga +3 -0
- package/dist/index.js +918 -192
- package/package.json +14 -5
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -233
- package/dist/index.d.ts +0 -82
- package/dist/shared/chunk-ks7faw1s.js +0 -1782
package/README.md
CHANGED
|
@@ -1,9 +1,50 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<h1 align="center"
|
|
2
|
+
<h1 align="center">🍂 sakuga</h1>
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
5
5
|
<strong>Create code animations</strong>
|
|
6
6
|
</p>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
+
## Demo
|
|
10
|
+
|
|
11
|
+
<video src="examples/demo.mp4" controls></video>
|
|
12
|
+
|
|
13
|
+
## How To Use
|
|
14
|
+
|
|
15
|
+
Install `ffmpeg`, then create a Markdown file with fenced code blocks:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bunx sakuga render examples/demo.md
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
To specify an output path, pass `--output` or `-o`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
bunx sakuga render examples/demo.md --output examples/demo.mp4
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Options
|
|
28
|
+
|
|
29
|
+
- `--format`, `-f`: Output container (`mp4` or `webm`, default: `mp4`).
|
|
30
|
+
- `--output`, `-o`: Output path (defaults to the input name + format extension).
|
|
31
|
+
- `--theme`, `-t`: Shiki theme for syntax highlighting (default: `github-dark`).
|
|
32
|
+
- `--background`: Fallback background color (default: `#0b0b0b`).
|
|
33
|
+
- `--foreground`: Fallback foreground color (default: `#e6e6e6`).
|
|
34
|
+
- `--font-family`: Font family for rendering (default: `SFMono-Regular` stack).
|
|
35
|
+
- `--font-size`: Font size in pixels (default: `24`).
|
|
36
|
+
- `--line-height`: Line height in pixels (default: `34`).
|
|
37
|
+
- `--padding`: Padding around the code block in pixels (default: `64`).
|
|
38
|
+
- `--width`: Minimum width of the rendered video in pixels (default: `1280`).
|
|
39
|
+
- `--height`: Minimum height of the rendered video in pixels (default: `720`).
|
|
40
|
+
- `--fps`: Frames per second (default: `60`).
|
|
41
|
+
- `--block-duration`: Duration of each code block in seconds (default: `2`).
|
|
42
|
+
- `--transition`, `-tr`: Transition duration between slides in milliseconds (default: `800`).
|
|
43
|
+
- `--transition-drift`: Pixel drift applied during transitions (default: `8`).
|
|
44
|
+
- `--tab-replacement`: String used to replace tabs (default: `" "`).
|
|
45
|
+
|
|
46
|
+
## Performance
|
|
47
|
+
|
|
48
|
+
Sakuga builds scenes concurrently when possible to maximize performance.
|
|
49
|
+
|
|
9
50
|
Made with [🥐 `pastry`](https://github.com/adelrodriguez/pastry)
|
package/bin/sakuga
ADDED