all repos — h3 @ 09c7b2541c8b63decfea9c0105825e0be6d8e498

A tiny, extremely minimalist JavaScript microframework.

Merge branch 'dev' of https://github.com/h3rald/h3 into dev
h3rald h3rald@h3rald.com
Wed, 03 Jun 2020 16:27:10 +0200
commit

09c7b2541c8b63decfea9c0105825e0be6d8e498

parent

657b885011dd461a861cb404fc44f75e8b5a839e

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.

@@ -19,7 +19,7 @@ ### I'm sold! Where can I get it?

Here, look, it's just one file: -<a href="https://raw.githubusercontent.com/h3rald/h3/v0.7.0/h3.js" target="_blank" class="button primary">Download v0.7.0 (Gory Gorn)</a> +<a href="https://raw.githubusercontent.com/h3rald/h3/v0.8.0/h3.js" target="_blank" class="button primary">Download v0.8.0 (Humble Human)</a> Yes there is also a [NPM package](https://www.npmjs.com/package/@h3rald/h3) if you want to use it with WebPack and similar, but let me repeat: _it's just one file_.

@@ -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>

@@ -7335,7 +7336,7 @@ <h3>I&rsquo;m sold! Where can I get it?<a href="#document-top" title="Go to top"></a></h3>

<p>Here, look, it&rsquo;s just one file:</p> -<p><a href="https://raw.githubusercontent.com/h3rald/h3/v0.7.0/h3.js" target="_blank" class="button primary">Download v0.7.0 (Gory Gorn)</a></p> +<p><a href="https://raw.githubusercontent.com/h3rald/h3/v0.8.0/h3.js" target="_blank" class="button primary">Download v0.8.0 (Humble Human)</a></p> <p>Yes there is also a <a href="https://www.npmjs.com/package/@h3rald/h3">NPM package</a> if you want to use it with WebPack and similar, but let me repeat: <em>it&rsquo;s just one file</em>.</p>

@@ -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>

@@ -7693,8 +7699,8 @@ h3("a.logo.col-sm-1", { href: "#/" }, [

h3("img", { alt: "H3", src: "images/h3.svg" }), ]), h3("div.version.col-sm.col-md", [ - h3("div.version-number", "v0.7.0"), - h3("div.version-label", "“Gory Gorn“"), + h3("div.version-number", "v0.8.0"), + h3("div.version-label", "“Humble Human“"), ]), h3("label.drawer-toggle.button.col-sm-last", { for: "drawer-control" }), ]);

@@ -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/example/assets/js/h3.jsdocs/example/assets/js/h3.js

@@ -1,5 +1,5 @@

/** - * H3 v0.7.0 "Gory Gorn" + * H3 v0.8.0 "Humble Human" * Copyright 2020 Fabio Cevasco <h3rald@h3rald.com> * * This source code is licensed under the MIT license found in the
M docs/js/app.jsdocs/js/app.js

@@ -44,8 +44,8 @@ h3("a.logo.col-sm-1", { href: "#/" }, [

h3("img", { alt: "H3", src: "images/h3.svg" }), ]), h3("div.version.col-sm.col-md", [ - h3("div.version-number", "v0.7.0"), - h3("div.version-label", "“Gory Gorn“"), + h3("div.version-number", "v0.8.0"), + h3("div.version-label", "“Humble Human“"), ]), h3("label.drawer-toggle.button.col-sm-last", { for: "drawer-control" }), ]);
M docs/js/h3.jsdocs/js/h3.js

@@ -1,5 +1,5 @@

/** - * H3 v0.7.0 "Gory Gorn" + * H3 v0.8.0 "Humble Human" * Copyright 2020 Fabio Cevasco <h3rald@h3rald.com> * * This source code is licensed under the MIT license found in the
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.

@@ -12,7 +12,7 @@ ### I'm sold! Where can I get it?

Here, look, it's just one file: -<a href="https://raw.githubusercontent.com/h3rald/h3/v0.7.0/h3.js" target="_blank" class="button primary">Download v0.7.0 (Gory Gorn)</a> +<a href="https://raw.githubusercontent.com/h3rald/h3/v0.8.0/h3.js" target="_blank" class="button primary">Download v0.8.0 (Humble Human)</a> Yes there is also a [NPM package](https://www.npmjs.com/package/@h3rald/h3) if you want to use it with WebPack and similar, but let me repeat: _it's just one file_.

@@ -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 docs/md/tutorial.mddocs/md/tutorial.md

@@ -118,8 +118,8 @@ h3("a.logo.col-sm-1", { href: "#/" }, [

h3("img", { alt: "H3", src: "images/h3.svg" }), ]), h3("div.version.col-sm.col-md", [ - h3("div.version-number", "v0.7.0"), - h3("div.version-label", "“Gory Gorn“"), + h3("div.version-number", "v0.8.0"), + h3("div.version-label", "“Humble Human“"), ]), h3("label.drawer-toggle.button.col-sm-last", { for: "drawer-control" }), ]);
M package.jsonpackage.json

@@ -1,7 +1,7 @@

{ "name": "@h3rald/h3", - "version": "0.7.0", - "versionName": "Gory Gorn", + "version": "0.8.0", + "versionName": "Humble Human", "description": "A tiny, extremely minimalist JavaScript microframework.", "main": "h3.js", "scripts": {
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);