This is the source code for my spellbook app.
Get Tweego installed and point it toward SugarCube. If you aren't sure how, you can just place the Tweego binary in the directory with the repo. You can place the
sugarcube-2 folder inside a directory called
story-formats in the same place, and everything should work.
After you have everything set up, run
npm install to install the development dependencies.
The projects structure works like this:
srcdirectory. You need to run
gulp buildto have these files concatenated, minified, and sent to the appropriate places in the
projectdirectory or they won't be compiled into the project by Tweego.
- Twee code goes in the
- To build everything, use Tweego by running
tweego --head=src\HEAD.html -o dist\index.html project.
- The compiled build will be available in the
index.html, where you can play it.
If you'd rather use Twine 1 or 2, you can either import
dist/index.html directly into Twine 2, or build an archive file for Twine 1 or 2 using Tweego. Note that some features unique to Tweego (specifically adding the
HEAD.html file to the output), will not work if you compile from Twine, so you may wich to re-export the project and use Tweego to build after editing.