A neat NPM package and wrapper for Tweego, downloads binaries from Tweego repo and expose a JS API
Now on beta!
Aimed to be used with build scripts for more complex stories
import { Tweenode, setupTweego } from 'tweenode'
// Will create a folder called .tweenode and download Tweego to it
// Won't download again if the folder is already there
await setupTweego()
// Instantiate Tweenode, you can pass some setup configs
const tweego = new Tweenode()
await tweego.process({
input: {
storyDir: 'path/to/story',
},
output: {
mode: 'file', // Write to a file or return as a string
fileName: 'path/to/output.html',
},
})
x86_64 | Arm | |
---|---|---|
Windowns | ✅ | ❔ |
Linux | ✅ | ❔ |
MacOS | ❔ | ❔ |
✅ = Tested | ❔ = Untested | ❌ = Don't work
To run on arm, emulation may be needed
# install dependencies
pnpm install
# test the library with Vitest
pnpm run test
# build the library, available under dist
pnpm run build
sugarcube-starter by nijikokun (Main source of inspiration)
tweego-bin by double-a-stories
MIT
This project is not affiliated or endorsed by Twine or The Interactive Fiction Technology Foundation
Created with Bun-lib-starter