UNPKG

wicked

Version:

Generates github wiki compatible API documentation from your project's jsdocs and adds them to your wiki.

211 lines 5.76 kB
<!-- GENERATED WITH WICKED. Don't edit this file directly, instead run wicked again to regenerate API docs --> <div class="jsdoc-githubify"> <h1 class="page-title">Namespace: Internal</h1> <section> <header> <h2> Internal </h2> </header> <article> <div class="container-overview"> <div class="description"><p>Internal wicked functions</p></div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"> <li> <a href="https://github.com/thlorenz/wicked/blob/master/index.js">index.js</a> <span>, </span> <a href="https://github.com/thlorenz/wicked/blob/master/index.js#L19">lineno 19</a> </li> </ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="cloneWiki"><span class="type-signature">&lt;static> </span>cloneWiki<span class="signature">(cb)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Clones the wiki project of the project in the current directory</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>called back with directory to which wiki was cloned</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"> <li> <a href="https://github.com/thlorenz/wicked/blob/master/lib/clone-wiki.js">lib/clone-wiki.js</a> <span>, </span> <a href="https://github.com/thlorenz/wicked/blob/master/lib/clone-wiki.js#L42">lineno 42</a> </li> </ul></dd> </dl> </dd> <dt> <h4 class="name" id="run"><span class="type-signature">&lt;static> </span>run<span class="signature">(bin, args, <span class="optional">cwd</span>, cb)</span><span class="type-signature"> &rarr; {Object}</span></h4> </dt> <dd> <div class="description"> <p>Spawns the given bin with the given args from the cwd or current working directory.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>bin</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> </td> <td class="description last"><p>full path to the binary to run</p></td> </tr> <tr> <td class="name"><code>args</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="attributes"> </td> <td class="description last"><p>the args to pass to the binary</p></td> </tr> <tr> <td class="name"><code>cwd</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>full path to the directory to run bin from, defaults to current directory</p></td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> </td> <td class="description last"><p>called back with err and/or program exit code</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"> <li> <a href="https://github.com/thlorenz/wicked/blob/master/lib/run.js">lib/run.js</a> <span>, </span> <a href="https://github.com/thlorenz/wicked/blob/master/lib/run.js#L6">lineno 6</a> </li> </ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>the spawned binary which exposes stdout and stderr streams</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> </dd> <dt> <h4 class="name" id="runJsdoc"><span class="type-signature">&lt;static> </span>runJsdoc<span class="signature">(projectroot, wikiroot, jsdocargs, cb)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Runs the jsdoc binary from the projectroot.</p> <h3>Note about jsdocargs</h3> <ul> <li>they shouldn't contain <code>--destination</code> option since destination is always inside wiki dir</li> <li>if no <code>--configure</code> option is given, the default <code>./config/jsdocrc.json</code> config is passed to jsdoc</li> </ul> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>projectroot</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>root of project whose jsdoc comments are converted to html</p></td> </tr> <tr> <td class="name"><code>wikiroot</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>in which the out folder with html files is created</p></td> </tr> <tr> <td class="name"><code>jsdocargs</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last"><p>extra args for jsdoc supplied via <code>-- --arg one --arg two ...</code></p></td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>called back when jsdocs were generated</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"> <li> <a href="https://github.com/thlorenz/wicked/blob/master/lib/run-jsdoc.js">lib/run-jsdoc.js</a> <span>, </span> <a href="https://github.com/thlorenz/wicked/blob/master/lib/run-jsdoc.js#L21">lineno 21</a> </li> </ul></dd> </dl> </dd> </dl> </article> </section> </div> <br> <h6><em>Generated with <a href="https://github.com/thlorenz/wicked">wicked</a>.</em></h6>