Skip to content

greatsquare0/tweenode

Repository files navigation

Tweenode

A neat NPM package and wrapper for Tweego, downloads binaries from Tweego repo and expose a JS API

Version JSON Badge NPM Version CI Workflow Status Build Workflow Status

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

See Tweego OS compatibility


Build from source

Requirements:

# install dependencies
pnpm install

# test the library with Vitest
pnpm run test

# build the library, available under dist
pnpm run build

Special thanks to these projects (And the people behind them):

Tweego by tmedwards

sugarcube-starter by nijikokun (Main source of inspiration)

tweego-bin by double-a-stories

tweego-node by mattrossman

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

About

A neat JS wrapper for Tweego

Topics

Resources

License

Stars

Watchers

Forks