Build Twine games using Webpack!
- Live-Reload
- Import SASS or CSS for styling
- Use Typescript or Javascript
- Automatically combines all imported Twee files
- Import images and other assets in twee with
@import
- Compatible with any story format
- Create a new node project and run
npm install twine-webpack
. - Create a
src
folder with either aindex.js
orindex.ts
file. - Make sure that file imports at least one
.twee
file with a passage named Start. Example:import "story.twee";
- Run
npx twine-webpack build
or usenpx twine-webpack start
to run the live server at http://localhost:3000
Configuration settings go in twine.config.js
. Documentation incoming.
If you want to reference an asset (such as an image or audio file) in Twee, simply wrap the filename in a @import()
like so:
:: My Passage
<img src='@import(./myImage.png)'>
The import will automatically be discovered and replaced with the final filename.