@rohal12/twee-ts 1.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 ADDED
@@ -0,0 +1,86 @@
1
+ # twee-ts
2
+
3
+ TypeScript reimplementation of [Tweego](https://www.motoslave.net/tweego/) — a command-line compiler for Twine/Twee interactive fiction projects.
4
+
5
+ Zero runtime dependencies. Node.js 22+.
6
+
7
+ **[Documentation](https://rohal12.github.io/twee-ts/)**
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install @rohal12/twee-ts
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```sh
18
+ npx @rohal12/twee-ts --init # scaffold a new project
19
+ npx @rohal12/twee-ts -o story.html src/ # compile
20
+ npx @rohal12/twee-ts -w -o story.html src/ # watch mode
21
+ ```
22
+
23
+ Or with a config file (`twee-ts.config.json`):
24
+
25
+ ```json
26
+ {
27
+ "sources": ["src/"],
28
+ "output": "story.html"
29
+ }
30
+ ```
31
+
32
+ ```sh
33
+ npx @rohal12/twee-ts
34
+ ```
35
+
36
+ ## Programmatic API
37
+
38
+ ```typescript
39
+ import { compile } from '@rohal12/twee-ts';
40
+
41
+ const result = await compile({
42
+ sources: ['src/'],
43
+ tagAliases: { library: 'script' },
44
+ });
45
+ ```
46
+
47
+ ## Build Plugins
48
+
49
+ ```typescript
50
+ // vite.config.ts
51
+ import { tweeTsPlugin } from '@rohal12/twee-ts/vite';
52
+
53
+ export default {
54
+ plugins: [tweeTsPlugin({ sources: ['src/'] })],
55
+ };
56
+ ```
57
+
58
+ Also available: `@rohal12/twee-ts/rollup`.
59
+
60
+ ## Documentation
61
+
62
+ Full docs at **[rohal12.github.io/twee-ts](https://rohal12.github.io/twee-ts/)**:
63
+
64
+ - [Getting Started](https://rohal12.github.io/twee-ts/getting-started)
65
+ - [CLI Reference](https://rohal12.github.io/twee-ts/cli)
66
+ - [Configuration](https://rohal12.github.io/twee-ts/configuration)
67
+ - [Tag Aliases](https://rohal12.github.io/twee-ts/tag-aliases)
68
+ - [Programmatic API](https://rohal12.github.io/twee-ts/api)
69
+ - [Vite & Rollup Plugins](https://rohal12.github.io/twee-ts/plugins)
70
+ - [Story Formats](https://rohal12.github.io/twee-ts/story-formats)
71
+ - [Packaging Formats](https://rohal12.github.io/twee-ts/story-format-packages)
72
+
73
+ ## Development
74
+
75
+ ```sh
76
+ pnpm install
77
+ pnpm test # run tests
78
+ pnpm run typecheck # type-check
79
+ pnpm run build # bundle
80
+ pnpm run docs:dev # local docs dev server
81
+ pnpm run docs:build # build docs for deployment
82
+ ```
83
+
84
+ ## License
85
+
86
+ This is free and unencumbered software released into the public domain. See [UNLICENSE](UNLICENSE).