twine-webpack

0.1.0-0 • Public • Published

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

  1. Create a new node project and run npm install twine-webpack.
  2. Create a src folder with either a index.js or index.ts file.
  3. Make sure that file imports at least one .twee file with a passage named Start. Example: import "story.twee";
  4. Run npx twine-webpack build or use npx twine-webpack start to 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.

Readme

Keywords

none

Package Sidebar

Install

npm i twine-webpack

Weekly Downloads

2

Version

0.1.0-0

License

MIT

Unpacked Size

12.6 kB

Total Files

12

Last publish

Collaborators

  • brwarner