tweenode
v0.3.0
Published
A neat JS wrapper for Tweego
Readme
Basic usage
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()
Compatibility
| | x86_64 | Arm | |---------:|:------:|:---:| | Windowns | ✅ | ❔ | | Linux | ✅ | ❔ | | MacOS | ❔ | ❔ |
✅ = Tested | ❔ = Untested | ❌ = Don't work
To run on arm, emulation may be needed
Build from source
Requirements:
# install dependencies
pnpm install
# test the library with Vitest
pnpm run test
# build the library, available under dist
pnpm run buildSpecial thanks to these projects (And the people behind them):
sugarcube-starter by nijikokun (Main source of inspiration)
tweego-bin by double-a-stories
License
MIT
Disclaimer
This project is not affiliated or endorsed by Twine or The Interactive Fiction Technology Foundation
Originally created with Bun-lib-starter, no longer used
