Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An advanced Twine 2 story format designed for people who already know JavaScript and CSS

License

Notifications You must be signed in to change notification settings

videlais/snowman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snowman

Node.js CI codecov

Snowman is an advanced Twine 2 story format designed for people who already know JavaScript and CSS. It was originally created by Chris Klimas and is currently maintained by Dan Cox.

Want to learn more?

The official Snowman documentation has more details.

What does Snowman offer?

Snowman does not use macros as found in sister story formats Harlowe and SugarCube. Instead, it provides template tags, <% ... %>, and a JavaScript API for accessing and manipulating the current story and its passages.

It also includes the JavaScript library jQuery.

Installing Snowman in Twine

To use Snowman as a story format in Twine 2:

  1. Open Twine 2.
  2. Go to Twine in the top-level menu.
  3. Click on Story Formats.
  4. In the sidebar, click on Add.
  5. Enter the JSONP URL for the version you want to use from the builds page

For example, to install the latest 2.X version, use:

https://videlais.github.io/snowman/builds/2.X/format.js

Major Branches

Snowman development is organized into major version branches:

Building Snowman

To create a new build of Snowman from this repository:

  1. Install dependencies:

    npm install
  2. Run the build process:

    npm run build
  3. Package the story format:

    npm run package

The compiled story format will be available in the dist/ directory as format.js.

Development Workflow

For a complete build including linting and testing, use:

npm run all

For validation without coverage (faster):

npm run validate

For complete validation with coverage:

npm run validate:full

Testing

Run unit tests:

npm test

Run end-to-end tests (requires compiled HTML files):

npm run test:e2e

Compile e2e test files and run tests in one command:

npm run test:e2e:compile

Run all tests with coverage:

npm run test:all

End-to-End Testing

The e2e tests require HTML files to be compiled from .twee source files using ExTwee. The repository includes a compilation script:

bash compile-e2e-tests.sh

This script compiles all .twee files in the test/e2e/ directory to HTML files using the current story format. The test:e2e:compile npm script combines this compilation step with test execution for convenience.

About

An advanced Twine 2 story format designed for people who already know JavaScript and CSS

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors 8

Languages