UNPKG

neutrinoscript

Version:
858 lines (208 loc) 9.66 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Global - Documentation</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convertToJS">convertToJS</a></li><li><a href="global.html#run">run</a></li><li><a href="global.html#runBinary">runBinary</a></li><li><a href="global.html#web">web</a></li><li><a href="global.html#webToJS">webToJS</a></li></ul> </nav> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="convertToJS"><span class="type-signature"></span>convertToJS<span class="signature">(filename, outfile, options)</span><span class="type-signature"></span></h4> <div class="description"> Converts a neutrino script (.neu) to javascript (.js) </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>filename</code></td> <td class="type"> <span class="param-type">File</span> </td> <td class="description last">The .neu file to run</td> </tr> <tr> <td class="name"><code>outfile</code></td> <td class="type"> <span class="param-type">File</span> </td> <td class="description last">The .js output file</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">Optional options to pass during conversion</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line72">line 72</a> </li></ul></dd> </dl> <h4 class="name" id="run"><span class="type-signature"></span>run<span class="signature">(filename, cb)</span><span class="type-signature"></span></h4> <div class="description"> Executes and runs a .neu script with optional callback </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>filename</code></td> <td class="type"> <span class="param-type">File</span> </td> <td class="description last">The .neu file to run</td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">Callback</span> </td> <td class="description last">Optional callback function that returns the executed scripts console output</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line31">line 31</a> </li></ul></dd> </dl> <h4 class="name" id="runBinary"><span class="type-signature"></span>runBinary<span class="signature">(filename, cb)</span><span class="type-signature"></span></h4> <div class="description"> Runs a neutrino (.neutrino) binary </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>filename</code></td> <td class="type"> <span class="param-type">File</span> </td> <td class="description last">The .neu file to run</td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">Callback</span> </td> <td class="description last">Optional callback function that returns the executed scripts console output</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line97">line 97</a> </li></ul></dd> </dl> <h4 class="name" id="web"><span class="type-signature"></span>web<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Finds all script tages with type="text/neutrinoscript" and executes the code within that script block </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line138">line 138</a> </li></ul></dd> </dl> <h4 class="name" id="webToJS"><span class="type-signature"></span>webToJS<span class="signature">(script, cb)</span><span class="type-signature"></span></h4> <div class="description"> Converts a web based neutrinoscript source to javascript </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>script</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The .neu file or script contents</td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type">Callback</span> </td> <td class="description last">Optional callback function that returns the executed scripts console output</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line160">line 160</a> </li></ul></dd> </dl> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Aug 09 2016 23:51:00 GMT-0400 (Eastern Daylight Time) using the Minami theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>