Skip to content

Commit

Permalink
Merge pull request #82 from tmedwards/develop
Browse files Browse the repository at this point in the history
RELEASE: v2.33.3
  • Loading branch information
tmedwards authored Nov 8, 2020
2 parents 0f08d2e + 4f3a45f commit 9f81847
Show file tree
Hide file tree
Showing 12 changed files with 5,657 additions and 1,093 deletions.
8 changes: 4 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/***********************************************************************************************************************
build.js (v1.4.16, 2020-06-03)
build.js (v1.4.18, 2020-11-08)
A Node.js-hosted build script for SugarCube.
Copyright © 2013–2020 Thomas Michael Edwards <[email protected]>. All rights reserved.
Expand Down Expand Up @@ -187,7 +187,7 @@ if (_opt.options.build) {

// Create the build ID file, if nonexistent.
if (!_fs.existsSync('.build')) {
writeFileContents('.build', 0);
writeFileContents('.build', '0');
}

// Get the version info and build metadata.
Expand Down Expand Up @@ -267,7 +267,7 @@ if (_opt.options.build) {
}

// Update the build ID.
writeFileContents('.build', version.build);
writeFileContents('.build', String(version.build));
})();

// That's all folks!
Expand Down Expand Up @@ -378,7 +378,7 @@ function compileJavaScript(filenameObj, options) {
const babelOpts = {
code : true,
compact : false,
presets : ['es2015'],
presets : ['env'],
filename : 'sugarcube.js'
};

Expand Down
2 changes: 1 addition & 1 deletion dist/format.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/api/api-uibar.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,25 @@ UIBar.unstow();
```
UIBar.unstow(true);
```

<!-- *********************************************************************** -->

### `UIBar.update()` {#uibar-api-method-update}

Updates all sections of the UI bar that are populated by special passages—e.g., `StoryBanner`, `StoryCaption`, `StoryMenu`, etc.

<p role="note" class="warning"><b>Warning:</b>
As <em>all</em> special passage populated sections are updated it is recommended that <code>UIBar.update()</code> be used sparingly. Ideally, if you need to update UI bar content outside of the normal passage navigation update, then you should update only the specific areas you need to rather than the entire UI bar.
</p>

#### Since:

* `v2.29.0`: Introduced.

#### Parameters: *none*

#### Examples:

```
UIBar.update();
```
8 changes: 8 additions & 0 deletions docs/core/markup.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ The `Link` component value may be the title of a passage or any valid URL to a r

In addition to the standard pipe separator (`|`) used to separate the `Link` and `Text` components (as seen below), SugarCube also supports the arrow separators (`->` &amp; `<-`). Particular to the arrow separators, the arrows' direction determines the order of the components, with the arrow always pointing at the `Link` component—i.e., the right arrow works like the pipe separator, `Text->Link`, while the left arrow is reversed, `Link<-Text`.

<p role="note" class="warning"><b>Warning (Twine&nbsp;2):</b>
Due to how the Twine&nbsp;2 automatic passage creation feature currently works, using any TwineScript expression for the <code>Link</code> component will cause a passage named after the expression to be created that will need to be deleted. To avoid this problem, it's suggested that you use the separate argument form of the <a href="#macros-macro-link"><code>&lt;&lt;link&gt;&gt;</code> macro</a> in Twine&nbsp;2 when you need to use an expression.
</p>

<table>
<caption>For the following examples assume: <code>$go</code> is <code>&quot;Grocery&quot;</code> and <code>$show</code> is <code>&quot;Go buy milk&quot;</code></caption>
<thead>
Expand Down Expand Up @@ -159,6 +163,10 @@ The `Image` component value may be any valid URL to an image resource (local or

In addition to the standard pipe separator (`|`) used to separate the `Image` and `Title` components (as seen below), SugarCube also supports the arrow separators (`->` &amp; `<-`). Particular to the arrow separators, the arrows' direction determines the order of the components, with the arrow always pointing at the `Image` component—i.e., the right arrow works like the pipe separator, `Title->Image`, while the left arrow is reversed, `Image<-Title`.

<p role="note" class="warning"><b>Warning (Twine&nbsp;2):</b>
Due to how the Twine&nbsp;2 automatic passage creation feature currently works, using any TwineScript expression for the <code>Link</code> component will cause a passage named after the expression to be created that will need to be deleted. To avoid this problem, it's suggested that you use the separate argument form of the <a href="#macros-macro-link"><code>&lt;&lt;link&gt;&gt;</code> macro</a> in Twine&nbsp;2 when you need to use an expression.
</p>

<table>
<caption>For the following examples assume: <code>$src</code> is <code>home.png</code>, <code>$go</code> is <code>&quot;Home&quot;</code>, and <code>$show</code> is <code>&quot;Go home&quot;</code></caption>
<thead>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/guide-harlowe-to-sugarcube.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Using a datamap in Harlowe:
In SugarCube:

```
<<set $map to new Map(["key", "value"])>>
<<set $map to new Map([["key", "value"]])>>
<<run $map.set("key", "another value")>>
<<if $map.has("key")>>…<</if>>
```
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/guide-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ In your menu passages, your long return links will simply reference the `$return
<<link "Return" $return>><</link>>
```

<p role="note"><b>Note (Twine&nbsp;2):</b>
Unfortunately, due to how the Twine&nbsp;2 automatic passage creation feature currently works, using the link markup form will cause a passage named <code>$return</code> to be created that will need to be deleted. To avoid this problem, it's suggested that you use the separate argument form of <a href="#macros-macro-link"><code>&lt;&lt;link&gt;&gt;</code></a> in Twine&nbsp;2—as shown above.
<p role="note" class="warning"><b>Warning (Twine&nbsp;2):</b>
Due to how the Twine&nbsp;2 automatic passage creation feature currently works, using the link markup form will cause a passage named <code>$return</code> to be created that will need to be deleted. To avoid this problem, it's suggested that you use the separate argument form of the <a href="#macros-macro-link"><code>&lt;&lt;link&gt;&gt;</code> macro</a> in Twine&nbsp;2—as shown above.
</p>

<!-- *********************************************************************** -->
Expand Down
12 changes: 12 additions & 0 deletions docs/guides/guide-typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- ***********************************************************************************************
Guide: TypeScript
************************************************************************************************ -->
# Guide: TypeScript {#guide-typescript}

TypeScript bindings for SugarCube APIs can found as the [Definitely Typed](https://definitelytyped.org/) package: `@types/twine-sugarcube`.

To install the package via NPM, use the following command:

```
npm install --save-dev @types/twine-sugarcube
```
3 changes: 3 additions & 0 deletions docs/table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@
* [`UIBar.show()`](#uibar-api-method-show)
* [`UIBar.stow()`](#uibar-api-method-stow)
* [`UIBar.unstow()`](#uibar-api-method-unstow)
* [`UIBar.update()`](#uibar-api-method-update)

----

Expand Down Expand Up @@ -641,6 +642,8 @@
* [Debug Bar](#guide-test-mode-debug-bar) (≥v2.23.0)
* [Debug Views](#guide-test-mode-debug-views) (≤v2.22.0)

## [Guide: TypeScript](#guide-typescript)

## [Guide: Installation](#guide-installation)

* [Local Install For Tweego](#guide-installation-tweego)
Expand Down
Loading

0 comments on commit 9f81847

Please sign in to comment.