UNPKG

lfr-amd-loader

Version:

AMD Loader with support for combo URL and conditional loading

1,024 lines (321 loc) 12.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: ConfigParser</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="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: ConfigParser</h1> <section> <header> <h2> ConfigParser </h2> </header> <article> <div class="container-overview"> <dt> <h4 class="name" id="ConfigParser"><span class="type-signature"></span>new ConfigParser<span class="signature">(<span class="optional">config</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> Creates an instance of ConfigurationParser class. </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>config</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">The configuration object to be parsed.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line12">line 12</a> </li></ul></dd> </dl> </dd> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="_parseConfig"><span class="type-signature">&lt;protected> </span>_parseConfig<span class="signature">(config)</span><span class="type-signature"> &rarr; {object}</span></h4> </dt> <dd> <div class="description"> Parses configuration object. </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>config</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Configuration object to be parsed.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line77">line 77</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> The created configuration </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </dd> <dt> <h4 class="name" id="_parseModules"><span class="type-signature">&lt;protected> </span>_parseModules<span class="signature">(modules)</span><span class="type-signature"> &rarr; {object}</span></h4> </dt> <dd> <div class="description"> Parses a provided modules configuration. </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>modules</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Map of modules to be parsed.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line98">line 98</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Map of parsed modules. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </dd> <dt> <h4 class="name" id="_registerConditionalModule"><span class="type-signature">&lt;protected> </span>_registerConditionalModule<span class="signature">(module)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> Registers conditional module to the configuration. </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>module</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Module object</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line118">line 118</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="addModule"><span class="type-signature"></span>addModule<span class="signature">(module)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> Adds a module to the configuration. </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>module</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">The module which should be added to the configuration. Should have the following properties: <ul> <strong>Obligatory properties</strong>: <li>name (String) The name of the module</li> <li>dependencies (Array) The modules from which it depends</li> </ul> <strong>Optional parameters:</strong> The same as those which config parameter of <a href="Loader.html#define">Loader#define</a> method accepts.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line37">line 37</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="getConditionalModules"><span class="type-signature"></span>getConditionalModules<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4> </dt> <dd> <div class="description"> Returns map with all currently registered conditional modules and their triggers. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line57">line 57</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Map with all currently registered conditional modules. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </dd> <dt> <h4 class="name" id="getConfig"><span class="type-signature"></span>getConfig<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4> </dt> <dd> <div class="description"> Returns the current configuration. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line48">line 48</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> The current configuration. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </dd> <dt> <h4 class="name" id="getModules"><span class="type-signature"></span>getModules<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h4> </dt> <dd> <div class="description"> Returns map with all currently registered modules. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="config-parser.js.html">config-parser.js</a>, <a href="config-parser.js.html#line66">line 66</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> Map with all currently registered modules. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">object</span> </dd> </dl> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ConfigParser.html">ConfigParser</a></li><li><a href="DependencyBuilder.html">DependencyBuilder</a></li><li><a href="EventEmitter.html">EventEmitter</a></li><li><a href="Loader.html">Loader</a></li><li><a href="URLBuilder.html">URLBuilder</a></li></ul><h3>Events</h3><ul><li><a href="Loader.html#event:moduleRegister">moduleRegister</a></li></ul> </nav> <br clear="both"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Tue Apr 28 2015 11:04:39 GMT+0200 (CEST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>