-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<hr /><p style='text-align: center;'>Last update: Thu Nov 2 01:33:56 CET 2023</p> | ||
<hr /><p style='text-align: center;'>Last update: Thu Nov 2 02:00:46 CET 2023</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,21 +103,33 @@ <h1 id="quickjs-types">QuickJS Types</h1> | |
src="https://img.shields.io/badge/License-GPL%20v3-yellow.svg" | ||
alt="GPLv3 License" /></a></p> | ||
<h2 id="usage">Usage</h2> | ||
<p>Add a submodule to a project, e.g. <code>types/quickjs</code>:</p> | ||
<h3 id="node">Node</h3> | ||
<p>Add using a package manager, e.g.: npm</p> | ||
<div class="sourceCode" id="cb1"><pre | ||
class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> submodule add [email protected]:mgred/quickjs-types.git types/quickjs</span></code></pre></div> | ||
<p>Extend <code>tsconfig.json</code> to use types:</p> | ||
class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">npm</span> i quickjs-types</span></code></pre></div> | ||
<p>Add types to <code>tsconfig.json</code>:</p> | ||
<div class="sourceCode" id="cb2"><pre | ||
class="sourceCode json"><code class="sourceCode json"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span> | ||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"compilerOptions"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"typeRoots"</span><span class="fu">:</span> <span class="ot">[</span><span class="st">"types"</span><span class="ot">]</span></span> | ||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"types"</span><span class="fu">:</span> <span class="ot">[</span><span class="st">"quickjs-types"</span><span class="ot">]</span></span> | ||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> | ||
<h3 id="git-submodule">Git Submodule</h3> | ||
<p>Add a submodule to a project, e.g. <code>types/quickjs</code>:</p> | ||
<div class="sourceCode" id="cb3"><pre | ||
class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> submodule add [email protected]:mgred/quickjs-types.git types/quickjs</span></code></pre></div> | ||
<p>Extend <code>tsconfig.json</code> to use types:</p> | ||
<div class="sourceCode" id="cb4"><pre | ||
class="sourceCode json"><code class="sourceCode json"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span> | ||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"compilerOptions"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"typeRoots"</span><span class="fu">:</span> <span class="ot">[</span><span class="st">"types"</span><span class="ot">]</span></span> | ||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> | ||
<h2 id="tests">Tests</h2> | ||
<p>All tests live in <code>test.ts</code>. To verify everyting passes, | ||
run:</p> | ||
<div class="sourceCode" id="cb3"><pre | ||
class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">tsc</span> <span class="at">-p</span> .</span></code></pre></div> | ||
<div class="sourceCode" id="cb5"><pre | ||
class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">tsc</span> <span class="at">-p</span> .</span></code></pre></div> | ||
<h2 id="license">License</h2> | ||
<p>Code in this repository is licensed under the <a | ||
href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public | ||
|
@@ -127,6 +139,6 @@ <h2 id="todos">Todos</h2> | |
<li><input type="checkbox" />Add more tests</li> | ||
<li><input type="checkbox" />Add more documentation (comments)</li> | ||
</ul> | ||
<hr /><p style='text-align: center;'>Last update: Thu Nov 2 01:33:56 CET 2023</p> | ||
<hr /><p style='text-align: center;'>Last update: Thu Nov 2 02:00:46 CET 2023</p> | ||
</body> | ||
</html> |