MIT License

项目介绍

videlais/snowman 是一个托管在 GitHub 上的开源项目,主要使用 HTML 编写,采用 MIT License 许可证,目前获得 140 个 Star、41 次 Fork。

仓库全名
videlais/snowman
开源许可证
MIT License
Star 数
140
Fork 数
41
未关闭 Issue
3

README 摘要

Snowman 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

snowman 用什么语言开发?

主要使用 HTML 编写,采用 MIT License 许可证,目前有 140 个 Star。

snowman 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 snowman 的源码?

可以直接克隆仓库:git clone https://github.com/videlais/snowman.git,默认分支为 main;安装与运行步骤见仓库 README。

snowman 最近还在维护吗?

仓库最近一次更新为 4 天前,当前有 3 个未关闭 Issue;Star 数为 140,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

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

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
226
价值分
96
活跃状态
活跃

语言占比

CSS
EJS
HTML
JavaScript
Shell

Release

README

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.

评论

暂无评论