all repos — h3 @ 00b06e7f5ea651d7e1b17b074a75b96499358d06

A tiny, extremely minimalist JavaScript microframework.

Doc  updates.
h3rald h3rald@h3rald.com
Sat, 30 May 2020 10:01:21 +0200
commit

00b06e7f5ea651d7e1b17b074a75b96499358d06

parent

46d47399e2530acbb4a6e5bdffe3aaccf3fd2d19

5 files changed, 25 insertions(+), 19 deletions(-)

jump to
M README.mdREADME.md

@@ -11,7 +11,7 @@ **H3** is a microframework to build client-side single-page applications (SPAs) in modern JavaScript.

H3 is also: -- **tiny**, under [750 sloc](https://github.com/h3rald/h3/blob/master/h3.js). +- **tiny**, under [800 sloc](https://github.com/h3rald/h3/blob/master/h3.js). - **modern**, in the sense that it runs only in modern browsers (latest versions of Chrome, Firefox, Edge & similar). - **easy** to learn, its API is comprised of only six methods and two properties.

@@ -46,6 +46,6 @@ ### What if something is broken?

Go fix it! Or at least open an issue on the [Github repo](https://github.com/h3rald/h3), pleasy. -### Can I download a copy of this site as a standalone HTML file? +### Can I download a copy of all the documentation as a standalone HTML file? -What a weird thing to ask... sure you can: [here](/H3_DeveloperGuide.htm)!+What a weird thing to ask... sure you can: [here](https://h3.js.org/H3_DeveloperGuide.htm)!
M docs/H3_DeveloperGuide.htmdocs/H3_DeveloperGuide.htm

@@ -7245,6 +7245,7 @@ <li><a href="#Hello,-World?">Hello, World?</a></li>

<li><a href="#Something-more-complex?">Something more complex?</a></li> <li><a href="#Can-I-use-it-then,-no-strings-attached?">Can I use it then, no strings attached?</a></li> <li><a href="#What-if-something-is-broken?">What if something is broken?</a></li> + <li><a href="#Can-I-download-a-copy-of-all-the-documentation-as-a-standalone-HTML-file?">Can I download a copy of all the documentation as a standalone HTML file?</a></li> </ul> </li> <li><a href="#Quick-Start">Quick Start</a>

@@ -7324,7 +7325,7 @@

<p>H3 is also:</p> <ul> -<li><strong>tiny</strong>, under <a href="https://github.com/h3rald/h3/blob/master/h3.js">750 sloc</a>.</li> +<li><strong>tiny</strong>, under <a href="https://github.com/h3rald/h3/blob/master/h3.js">800 sloc</a>.</li> <li><strong>modern</strong>, in the sense that it runs only in modern browsers (latest versions of Chrome, Firefox, Edge &amp; similar).</li> <li><strong>easy</strong> to learn, its API is comprised of only six methods and two properties.</li> </ul>

@@ -7364,6 +7365,11 @@ <a name="What-if-something-is-broken?"></a>

<h3>What if something is broken?<a href="#document-top" title="Go to top"></a></h3> <p>Go fix it! Or at least open an issue on the <a href="https://github.com/h3rald/h3">Github repo</a>, pleasy.</p> + +<a name="Can-I-download-a-copy-of-all-the-documentation-as-a-standalone-HTML-file?"></a> +<h3>Can I download a copy of all the documentation as a standalone HTML file?<a href="#document-top" title="Go to top"></a></h3> + +<p>What a weird thing to ask&hellip; sure you can: <a href="https://h3.js.org/H3_DeveloperGuide.htm">here</a>!</p> <a name="Quick-Start"></a> <h2>Quick Start<a href="#document-top" title="Go to top"></a></h2>

@@ -7507,19 +7513,19 @@

<a name="Route-Components"></a> <h4>Route Components<a href="#document-top" title="Go to top"></a></h4> -<p>A route components is a top-level component specified to handle a specific route. Unlike ordinary components, route components:</p> +<p>A route component is a top-level component that handles a route. Unlike ordinary components, route components:</p> <ul> -<li>may have a dedicated <em>setup</em> (after the route component is added to the DOM) and <em>teardown</em> phase (after the route component is removed from the DOM and the new route component is loaded).</li> +<li>may have a dedicated <em>setup</em> (after the route component is added to the DOM) and <em>teardown</em> phase (after the route component is removed from the DOM and before the new route component is loaded).</li> <li>may have built-in local state, initialized during setup and (typically) destroyed during teardown.</li> </ul> -<p>Route components are stll created using ordinary function returning a VNode, but you can optionally define a <strong>setup</strong> and a <strong>teardown</strong> async methods on them (Functions are Objects in JavaScript after all&hellip;) to be executed during the corresponding phase.</p> +<p>Route components are stll created using ordinary function returning a VNode, but you can optionally define a <strong>setup</strong> and a <strong>teardown</strong> async methods on them (functions are objects in JavaScript after all&hellip;) to be executed during each corresponding phase.</p> <p>Note that: -* Both the <strong>setup</strong> method take an object as a parameter, representing the component state. Such object will be empty the first time the <strong>setup</strong> method is called for a given component, but it may contain properties not removed during teardowns. -* The <strong>teardown</strong> method can return an object, which will be retained as component state. If however nothing is returned, the component state is deleted. +* Both the <strong>setup</strong> method take an object as a parameter, representing the component state. Such object will be empty the first time the <strong>setup</strong> method is called for a given component, but it may contain properties not removed during subsequent teardowns. +* The <strong>teardown</strong> method can return an object, which will be retained as component state. If however nothing is returned, the component state object is emptied. * Both methods can be asynchronous, in which case H3 will wait for their completion before proceeding.</p> <a name="How-everything-works..."></a>

@@ -8044,7 +8050,7 @@ </ul>

</div> <div id="footer"> - <p><span class="copy"></span> Fabio Cevasco &ndash; May 29, 2020</p> + <p><span class="copy"></span> Fabio Cevasco &ndash; May 30, 2020</p> <p><span>Powered by</span> <a href="https://h3rald.com/hastyscribe"><span class="hastyscribe"></span></a></p> </div> </div>
M docs/md/key-concepts.mddocs/md/key-concepts.md

@@ -80,16 +80,16 @@

#### Route Components -A route components is a top-level component specified to handle a specific route. Unlike ordinary components, route components: +A route component is a top-level component that handles a route. Unlike ordinary components, route components: -* may have a dedicated *setup* (after the route component is added to the DOM) and *teardown* phase (after the route component is removed from the DOM and the new route component is loaded). +* may have a dedicated *setup* (after the route component is added to the DOM) and *teardown* phase (after the route component is removed from the DOM and before the new route component is loaded). * may have built-in local state, initialized during setup and (typically) destroyed during teardown. -Route components are stll created using ordinary function returning a VNode, but you can optionally define a **setup** and a **teardown** async methods on them (Functions are Objects in JavaScript after all...) to be executed during the corresponding phase. +Route components are stll created using ordinary function returning a VNode, but you can optionally define a **setup** and a **teardown** async methods on them (functions are objects in JavaScript after all...) to be executed during each corresponding phase. Note that: -* Both the **setup** method take an object as a parameter, representing the component state. Such object will be empty the first time the **setup** method is called for a given component, but it may contain properties not removed during teardowns. -* The **teardown** method can return an object, which will be retained as component state. If however nothing is returned, the component state is deleted. +* Both the **setup** method take an object as a parameter, representing the component state. Such object will be empty the first time the **setup** method is called for a given component, but it may contain properties not removed during subsequent teardowns. +* The **teardown** method can return an object, which will be retained as component state. If however nothing is returned, the component state object is emptied. * Both methods can be asynchronous, in which case H3 will wait for their completion before proceeding. ### How everything works...
M docs/md/overview.mddocs/md/overview.md

@@ -4,7 +4,7 @@ **H3** is a microframework to build client-side single-page applications (SPAs) in modern JavaScript.

H3 is also: -- **tiny**, under [750 sloc](https://github.com/h3rald/h3/blob/master/h3.js). +- **tiny**, under [800 sloc](https://github.com/h3rald/h3/blob/master/h3.js). - **modern**, in the sense that it runs only in modern browsers (latest versions of Chrome, Firefox, Edge & similar). - **easy** to learn, its API is comprised of only six methods and two properties.

@@ -39,3 +39,6 @@ ### What if something is broken?

Go fix it! Or at least open an issue on the [Github repo](https://github.com/h3rald/h3), pleasy. +### Can I download a copy of all the documentation as a standalone HTML file? + +What a weird thing to ask... sure you can: [here](https://h3.js.org/H3_DeveloperGuide.htm)!
M scripts/release.jsscripts/release.js

@@ -30,9 +30,6 @@ `Download v${pkg.version} (${pkg.versionName})`

); fs.writeFileSync(readme, readmeData); -// Remove link to download guide in overview.md -readmeData = readmeData.replace(/### Can I download(\n|\r|.)+/gm, ""); - // Remove badges and copy to overview.md const overviewData = readmeData.replace(/[^\*]+\*\*\*\s+/m, ""); fs.writeFileSync(overview, overviewData);