A neat NPM package and wrapper for Tweego, downloads binaries from Tweego repo and expose a JS API
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 = await tweenode({
input: {
storyDir: 'path/to/story',
},
output: {
mode: 'file', // Write to a file or return as a string
fileName: 'path/to/output.html',
},
})
await tweego.process()| 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 buildsugarcube-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
Originally created with Bun-lib-starter, no longer used