Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

SugarCube is a free (gratis and libre) story format for Twine/Twee.

License

NotificationsYou must be signed in to change notification settings

tmedwards/sugarcube-2

Repository files navigation

SugarCube is a free (gratis and libre) story format forTwine/Twee.

Downloads and documentation may be found atSugarCube website.

If you believe that you've found a bug in SugarCube or simply wish to make a suggestion, you may do so bycreating a new issue. SugarCube also has awork log that may be of interest.

INSTALLATION

You may either download one of the precompiled packages fromSugarCube's website or build SugarCube from source—seeBUILDING FROM SOURCE below.

BUILDING FROM SOURCE

If you want to build SugarCube from scratch, rather than grabbing one of the pre-built packages off of its website, then these instructions are for you.

SugarCube uses Node.js (currently ≥v16) as the core of its build system, so you'll need to install it if you don't already have it. Additionally, to retrieve SugarCube's source code from this repository, you'll need to install Git.

  1. Download and install the Node.js JavaScript runtime (https://nodejs.org/)
  2. Download and install the Git source control management tool (https://git-scm.com/)

Once all the tooling has been installed and set up, the next step is to fetch the SugarCube source code. Open a shell to wherever you wish to store the code and run the following command to clone the repository:

git clone https://github.com/tmedwards/sugarcube-2.git

Next, change to the directory that the previous command created, which is your local clone of the repository:

cd sugarcube-2

There are two major branches within the repository:

  • develop: The main development branch
  • master: The stable release branch

Be sure to switch to the branch you wish to work on by issuing the appropriategit checkout command.

Once you're on the correct branch, fetch SugarCube's development dependencies:

npm install

You should now have SugarCube and all dependencies downloaded, so you may build it by running the following command:

node build.js

Assuming that completed with no errors, the story format, in both Twine 1 and Twine 2 flavors, should be output to thebuild directory. Congratulations!

NOTE: SugarCube's development dependencies are occasionally updated. If you receive errors when attempting to build, then you probably need to update your cached dependencies. You may do this via thenpm update --save -D command or, in extreme cases, by first runningnpm uninstall and thennpm install.

TIP: If you'd like additional options when building—e.g., debug builds, limiting the build to a particular version of Twine, etc.—then you may request help frombuild.js by specifying the help (-h,--help) option. For example:

node build.js -h

[8]ページ先頭

©2009-2025 Movatter.jp