1. Chris Klimas
  2. twinejs


twinejs /

Filename Size Date modified Message
129 B
.editorconfig returns renewed
10 B
Switch to Webpack-based workflow
395 B
Switch to Webpack-based workflow
102 B
Switch to Webpack-based workflow
1.5 KB
Added tag 2.1.0b2 for changeset 18884dd4cc1f
560 B
jscs.json -> .jscsrc
895 B
35.8 KB
Add license
3.4 KB
Fix up localization extraction
683 B
Switch to Webpack-based workflow
2.8 KB
Bump version
737 B
Switch to Webpack-based workflow
1.9 KB
Use html-loader for HTML includes; doesn't solve all image references, but
548 B
Switch to Webpack-based workflow


by Chris Klimas, Leon Arnott, Daithi O Crualaoich, Ingrid Cheung, Thomas Michael Edwards, Micah Fitch, Juhana Leinonen, and Ross Smith


This is a port of Twine to a local browser-based app. See twinery.org for more info.

The story formats in minified format under story-formats/ exist in separate repositories:


Run npm install at the top level of the directory to install all goodies.


Run npm start to begin serving a development version of Twine to http://localhost:8080. This server will automatically update with changes you make. You can also create a dev build at build/ with npm run build.

npm lint and npm test will lint and test the source code respectively.

npm pot will create a POT template file for localization at src/locale/po/template.pot. See Localization below for more information.

npm nw will build NW.js-based apps in dist/nw. In order to build Windows apps on OS X or Linux, you will need to have Wine and makensis installed.

To build distributable versions of Twine, use npm run package. This will create ZIP archives and Windows installer packages under dist/uploads. An additional file named 2.json is created under dist/. This contains information relevant to the autoupdater process, and is currently posted to http://twinery.org/latestversion/2.json.

npm run clean will delete existing files in build/ and dist/.


Would you like to help localize Twine for another language? Awesome! You don't need to know JavaScript to do so. Here's how it works:

  1. Download template.pot from the repository.

  2. Use a translation application like Poedit to create a .po file with the source text translated. If you are using Poedit, get started by choosing New from POT/PO File from the File menu. Make sure to name your po file according to the IETF locale naming convention -- Poedit can help suggest that as well. For example, a generic French translation should be named fr.po, while an Australian English one would be named en-au.po.

  3. Finally, two other things are needed: an SVG-formatted image of the flag that should be associated with your language, and what native speakers call the language you are localizing to (e.g. Français for French speakers). Wikimedia Commons is your best bet for nice-looking SVG flags. Obviously, whatever image you provide must either be in the public domain or otherwise OK to use in Twine without any compensation.

  4. If you're comfortable using Mercurial, then you can open a pull request to have your localization added. Please place it in the src/locale/po directory. If you aren't, you can instead open a bug tracker issue and attach your PO file, flag image, and language name and we'll take it from there.