[New, Update] Messy commit.

* [Update] Add module paths to watch files.  From the old Bitbucket repo, submitted by `MarkSill`.
* [Fix] Trim erroneous whitespace surrounding the story title.  From the old Bitbucket repo.
* [Update, Devel, Docs] Changed import and doc paths to point to the GitHub repo and removed Mercurial references.
* [Fix] Leading whitespace on passages is trimmed as intended.
* [New, Docs] Added an option to disable passage trimming (`--no-trim`).
* [Update] Update IFID commentary and cleanup.
* [Update] Switched to another SemVer module due to a few issues with the old one.
* [Update] Purged commented legacy & debug code.
This commit is contained in:
Thomas M. Edwards 2019-12-23 14:25:57 -06:00
parent 57e1aa52ff
commit 1bb4278938
15 changed files with 123 additions and 64 deletions

View file

@ -5,7 +5,7 @@
This is a collection of tips, from how to avoid pitfalls to best practices.
Suggestions for new entries may be submitted by [creating a new issue](https://bitbucket.org/tmedwards/tweego/issues?status=new&status=open) at Tweego's [code repository](https://bitbucket.org/tmedwards/tweego/). **NOTE:** Acceptance of submissions ***is not*** guaranteed.
Suggestions for new entries may be submitted by [creating a new issue](https://github.com/tmedwards/tweego/issues) at Tweego's [code repository](https://github.com/tmedwards/tweego). **NOTE:** Acceptance of submissions ***is not*** guaranteed.
<!-- ***************************************************************************
@ -14,7 +14,7 @@ Suggestions for new entries may be submitted by [creating a new issue](https://b
<span id="faq-and-tips-avoid-processing-files"></span>
## Avoid processing files
The way to avoid having Tweego process files is to not pass it the files in the first place—i.e. keep the files in question separate from the files you want Tweego to compile.
The way to avoid having Tweego process files is to not pass it the files in the first place—i.e., keep the files in question separate from the files you want Tweego to compile.
Using image files as an example, I would generally recommend a directory structure something like:

View file

@ -56,8 +56,8 @@ The various methods for specifying configuration settings cascade in the followi
<dd>
<p>Path(s) to search for story formats. The value should be a list of directories to search for story formats. You may specify one directory or several. The format is exactly the same as any other <em>path type</em> environment variable for your operating system.</p>
<p class="tip" role="note"><b>Tip:</b> Setting <var>TWEEGO_PATH</var> is only necessary if you intend to place your story formats outside of the directories normally searched by Tweego. See <a href="#getting-started-story-formats-search-directories">Search Directories</a> for more information.</p>
<p role="note"><b>Note:</b> To separate multiple directories within <em>path</em> variables, Unix-like operating systems use the colon, while Windows uses the semi-colon. Only relevant if you intend to specify multiple directories.</p>
<p><strong>Unix-y examples</strong></p>
<p role="note"><b>Note:</b> To separate multiple directories within <em>path</em> variables, Unix/Unix-like operating systems use the colon (<kbd>:</kbd>), while Windows uses the semi-colon (<kbd>;</kbd>). Only relevant if you intend to specify multiple directories.</p>
<p><strong>Unix/Unix-like examples</strong></p>
<p>If you wanted Tweego to search <code>/usr/local/storyformats</code>, then you'd set <code>TWEEGO_PATH</code> to:</p>
<pre><code>/usr/local/storyformats</code></pre>
<p>If you wanted Tweego to search <code>/storyformats</code> and <code>/usr/local/storyformats</code>, then you'd set <code>TWEEGO_PATH</code> to:</p>
@ -106,7 +106,7 @@ When Tweego is run, it finds story formats to use by searching the following dir
4. The directories specified via the <var>TWEEGO_PATH</var> environment variable. See <a href="#getting-started-environment-variables">Environment Variables</a> for more information.
<p role="note"><b>Note:</b>
For legacy compatibility, the following directories are also checked during steps #13: <kbd>story-formats</kbd>, <kbd>storyFormats</kbd>, and <kbd>targets</kbd>. You are encouraged to use one of the directory names listed above instead.
For legacy compatibility, the following directories are also checked during steps #13: <kbd>story-formats</kbd>, <kbd>storyFormats</kbd>, and <kbd>targets</kbd>. You are <strong><em>strongly encouraged</em></strong> to use one of the directory names listed above instead.
</p>
<p class="warning" role="note"><b>Warning:</b>

View file

@ -25,7 +25,7 @@ The names of all special passages and tags listed herein are case sensitive, thu
<span id="special-passages-start"></span>
### `Start`
The `Start` passage will, by default, be used as the starting passage—i.e. the first normal passage displayed to the player. That behavior may be overridden via either the <var>start</var> property from the [`StoryData` passage](#special-passages-storydata) or the start command line option (<kbd>-s NAME</kbd>, <kbd>--start=NAME</kbd>).
The `Start` passage will, by default, be used as the starting passage—i.e., the first normal passage displayed to the player. That behavior may be overridden via either the <var>start</var> property from the [`StoryData` passage](#special-passages-storydata) or the start command line option (<kbd>-s NAME</kbd>, <kbd>--start=NAME</kbd>).
<p class="tip" role="note"><b>Tip:</b>
It is <strong><em>strongly recommended</em></strong> that you simply use the default starting name, <code>Start</code>, when beginning new projects.

View file

@ -59,6 +59,10 @@ Where <code>[options]</code> are mostly optional configuration flags—see [Opti
<p role="note"><b>Note:</b> Unsupported when watch mode (<kbd>-w</kbd>, <kbd>--watch</kbd>) is enabled.</p>
</dd>
<dt><kbd>-m SRC</kbd>, <kbd>--module=SRC</kbd></dt><dd>Module sources (repeatable); may consist of supported files and/or directories to recursively search for such files. Each file will be wrapped within the appropriate markup and bundled into the &lt;head&gt; element of the compiled HTML. Supported files: <code>.css</code>, <code>.js</code>, <code>.otf</code>, <code>.ttf</code>, <code>.woff</code>, <code>.woff2</code>.</dd>
<dt><kbd>--no-trim</kbd></dt><dd>
<p>Do not trim whitespace surrounding passages—i.e., whitespace preceding and trailing the actual text of the passage. By default, such whitespace is removed when processing passages.</p>
<p role="note"><b>Note:</b> It is recommended that you do not disable passage trimming.</p>
</dd>
<dt><kbd>-o FILE</kbd>, <kbd>--output=FILE</kbd></dt><dd>Name of the output file (default: <kbd>-</kbd>; i.e., <a href="https://en.wikipedia.org/wiki/Standard_streams" target="&#95;blank"><i>standard output</i></a>).</dd>
<dt><kbd>-s NAME</kbd>, <kbd>--start=NAME</kbd></dt><dd>Name of the starting passage (default: the passage set by the story data, elsewise <code>"Start"</code>).</dd>
<dt><kbd>-t</kbd>, <kbd>--test</kbd></dt><dd>Compile in test mode; only for story formats in the Twine&nbsp;2 style.</dd>