0.1.0-0 • Published 4 years ago
twine-webpack v0.1.0-0
Twine Webpack
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
Basic Usage
- Create a new node project and run
npm install twine-webpack. - Create a
srcfolder with either aindex.jsorindex.tsfile. - Make sure that file imports at least one
.tweefile with a passage named Start. Example:import "story.twee"; - Run
npx twine-webpack buildor usenpx twine-webpack startto run the live server at http://localhost:3000
Configuration
Configuration settings go in twine.config.js. Documentation incoming.
Asset Import into Twee
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.