README.md in twee2-0.2.2 vs README.md in twee2-0.3.0

- old
+ new

@@ -12,18 +12,26 @@ Right now Twee2 doesn't even support the diversity of original Twee, and it's possible that it never will. As the need arises, though, I may add additional features that seemed to be 'missing' from Twee, to me. I'd love to hear your thoughts about the future of this gem. +## Prerequisites + +You'll need Ruby. Instructions on easily installing it on MacOS, Windows, and Linux can be found at https://www.ruby-lang.org/en/documentation/installation/. + ## Installation Install using gem gem install twee2 ## Usage +To see usage examples and fuller instructions (documentation on this page is lacking, but as-yet no documentation is complete): + + twee2 + To compile a Twee file into a HTML file using the default format (Harlowe): twee2 build inputfile.twee outputfile.html To use a specific format, e.g. Snowman: @@ -34,10 +42,35 @@ ## Special features Aside from the regular Twee features, Twee2 provides the following enhancements: +### Multi-file inclusion (super-experimental) + +You can combine multiple input files into one via either (or both!) of two different methods: + +#### StoryIncludes + +Borrowed from Twee: simply list the files to include in the special StoryIncludes passage. Each will be appended to the end of your source file on compilation. + +``` +::StoryIncludes +my-sub-story.tw2 +``` + +Looking for something more-powerful? Use ::@include-syntax, e.g.: + +``` +::IncompleteRoom [haml] +%p + This room is incomplete. Come back later. +:coffeescript + ::@include incomplete-room-js.coffee +``` + +The requested file will be nested directly in place. Indent levels will be preserved, which makes it safe for use within HAML, Coffeescript, and SASS. This makes it easy to re-use content throughout your story by simply inserting it in multiple places. + ### HAML support You can declare your passages using [HAML markup](http://haml.info/docs/yardoc/file.REFERENCE.html) by applying a 'haml' tag to the passage, e.g.: ``` @@ -53,9 +86,24 @@ ``` ::MyJavascripts [coffee script] $ -> alert 'Welcome to my game!' ``` + +### SASS/SCSS stylesheets + +Prefer SASS for your stylesheets? Just use a 'sass' or 'scss' tag alongside your 'stylesheet' tag, or use a :sass or :scss block in HAML: + +``` +::MyStylesheet [scss stylesheet] +body { + color: #eee; +} +tw-passage { + tw-link { + color: red; + } +} ## Notes * This is not a Twee to Harlowe converter. You'll still need to change your macros as described at http://twine2.neocities.org/, and/or rewrite them as Javascript code. * Some special story segments (e.g. StorySubtitle) are ignored. You will be warned when this happens. \ No newline at end of file