Compile inkle's story Ink file into JSON, with watching mode.
ink-utils can :
- Compile a ink file into Json.
- Watch for ink file changes, in order to perform compilation each time.
$ yarn global add @6i/ink-tools
As local developpement dependencies:
$ yarn add @6i/ink-tools --dev
compile command have many options :
||Do not output any message|
||Increase the verbosity level : level 1 for normal information, 2 more verbose for debugging and 3 for full debug.|
||Change the output where JSON file is created.|
||Enable watch mode, to detect if ink file has changed and start compilation each time.|
Make a single compilation
compile command wait as first argument an *.ink file. Without another option, it will compil into a json file with the same name and the same folder of input ink file.
# Simple usage $ ink-tools compile .\ink\story-basic.ink === Start compilation === [success] Inklecate compilation has finished !
You can add verbosity with
-v, and change output with
--output <jsonFile> like this :
# Change output JSON $ ink-tools compile .\ink\story-basic.ink -v --output .\myStory.json === Start compilation === [info] Ink name file: story-basic.ink [info] Ink path file: D:\6i\ink-tools\ink\story-basic.ink [info] Output JSON: D:\6i\ink-tools\myStory.json [info] Inklecate bin: D:\6i\ink-tools\bin\inklecate\inklecate_win.exe [info] Ink compilation is starting. [success] Inklecate compilation has finished !
Watch for ink file change
To enable watch mode, just add
--watch option in
$ ink-tools compile .\ink\story-basic.ink --watch -v
The program can listen for ink file changes and start compilation each time it detects changement. It use an MD5 checksum of the file in order to check if the file has really changed.
Ink is inkle's scripting language for writing interactive narrative, both for text-centric games as well as more graphical games that contain highly branching stories. It's designed to be easy to learn, but with powerful enough features to allow an advanced level of structuring.
Release under MIT license.
Copyright (c) 2020 by 2o1oo email@example.com