Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated for version 0.3.0

  • Loading branch information...
commit 53f2aef754c1cd6552019e893b87998193fb645f 1 parent 076ab8d
@hiddentao hiddentao authored
View
9 api/config/base.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -231,8 +233,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:41 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/config/development.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li class="active"><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li class="active"><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -136,8 +138,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:41 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/config/index.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li class="active"><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li class="active"><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -131,8 +133,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:41 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/controllers/main.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li class="active"><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li class="active"><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -120,8 +122,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:42 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
18 api/index.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li><a href="routes.js.html">routes.js</a></li>
<li><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li><a href="routes.js.html">routes.js</a></li>
<li><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -77,8 +79,13 @@
</div>
</div>
<div role="main" class="col-md-7 waigo-api-content">
- <section id="Main" class="readme">
- <p>Welcome to the API documentation for Waigo. This gets auto-generated from the source code.</p>
+ <section id="Main" class="readme"><p>Welcome to the API documentation for Waigo. This documentation is auto-generated from the source code.</p>
+<p>Here you will find detailed documentation on all the module files provided within the framework. For each module file each
+of its exported properties and APIs will be documented along with source code. Code examples will be provided where
+appropriate to show you how best to make use of the functionality.</p>
+<p>We recommend starting with <a href="loader.js.html">loader.js</a>. This is the main module loader and starting point for all Waigo apps.</p>
+<p><em>Note: If you haven&#39;t yet read the <a href="/">guide</a> then please do so. It will help you better understand these docs.</em></p>
+
</section>
</div>
<div class="col-md-2">
@@ -91,8 +98,7 @@
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:41 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
403 api/loader.js.html
@@ -0,0 +1,403 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" charset="utf-8">
+ <title>Waigo.js</title><!--[if IE]><link rel="shortcut icon" href="img/logo_32x32.ico" /><![endif]-->
+ <link rel="shortcut icon" href="/img/logo_114x114.png">
+ <meta name="msapplication-TileColor" content="#fff">
+ <meta name="msapplication-TileImage" content="/img/logo_144x144.png">
+ <link rel="stylesheet" media="screen" href="/style.css">
+ </head>
+ <body>
+ <header id="top" role="banner" class="navbar navbar-static-top">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" data-toggle="collapse" data-target=".topmenu-navbar-collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/" class="navbar-brand">Waigo</a>
+ </div>
+ <div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
+ <ul class="nav navbar-nav">
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="https://github.com/waigo/waigo">Github</a></li>
+ </ul>
+ </div>
+ </div>
+ </header>
+ <main id="content">
+ <div id="api">
+ <div class="container">
+ <div class="row">
+ <div role="complementary" class="col-md-3 waigo-api-index">
+ <ul class="nav hidden-sm hidden-xs">
+ <li><a href="index.html">Main</a></li>
+ <li><a href="config/base.js.html">config/base.js</a></li>
+ <li><a href="config/development.js.html">config/development.js</a></li>
+ <li><a href="config/index.js.html">config/index.js</a></li>
+ <li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li class="active"><a href="loader.js.html">loader.js</a></li>
+ <li><a href="routes.js.html">routes.js</a></li>
+ <li><a href="server.js.html">server.js</a></li>
+ <li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
+ <li><a href="support/errors.js.html">support/errors.js</a></li>
+ <li><a href="support/logging/winston.js.html">support/logging/winston.js</a></li>
+ <li><a href="support/middleware/errorHandler.js.html">support/middleware/errorHandler.js</a></li>
+ <li><a href="support/middleware/outputFormats.js.html">support/middleware/outputFormats.js</a></li>
+ <li><a href="support/middleware/responseTime.js.html">support/middleware/responseTime.js</a></li>
+ <li><a href="support/middleware/sessions.js.html">support/middleware/sessions.js</a></li>
+ <li><a href="support/outputFormats/html.js.html">support/outputFormats/html.js</a></li>
+ <li><a href="support/outputFormats/json.js.html">support/outputFormats/json.js</a></li>
+ <li><a href="support/routeMapper.js.html">support/routeMapper.js</a></li>
+ <li><a href="support/session/store/mongo.js.html">support/session/store/mongo.js</a></li>
+ </ul>
+ <div class="visible-sm visible-xs">
+ <button type="button" data-toggle="collapse" data-target="#api-index-xs" class="btn btn-info">Show/hide API index</button>
+ <div id="api-index-xs" class="collapse">
+ <ul class="nav">
+ <li><a href="index.html">Main</a></li>
+ <li><a href="config/base.js.html">config/base.js</a></li>
+ <li><a href="config/development.js.html">config/development.js</a></li>
+ <li><a href="config/index.js.html">config/index.js</a></li>
+ <li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li class="active"><a href="loader.js.html">loader.js</a></li>
+ <li><a href="routes.js.html">routes.js</a></li>
+ <li><a href="server.js.html">server.js</a></li>
+ <li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
+ <li><a href="support/errors.js.html">support/errors.js</a></li>
+ <li><a href="support/logging/winston.js.html">support/logging/winston.js</a></li>
+ <li><a href="support/middleware/errorHandler.js.html">support/middleware/errorHandler.js</a></li>
+ <li><a href="support/middleware/outputFormats.js.html">support/middleware/outputFormats.js</a></li>
+ <li><a href="support/middleware/responseTime.js.html">support/middleware/responseTime.js</a></li>
+ <li><a href="support/middleware/sessions.js.html">support/middleware/sessions.js</a></li>
+ <li><a href="support/outputFormats/html.js.html">support/outputFormats/html.js</a></li>
+ <li><a href="support/outputFormats/json.js.html">support/outputFormats/json.js</a></li>
+ <li><a href="support/routeMapper.js.html">support/routeMapper.js</a></li>
+ <li><a href="support/session/store/mongo.js.html">support/session/store/mongo.js</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div role="main" class="col-md-7 waigo-api-content">
+ <section id="waigoFolder">
+ <h1>waigoFolder</h1>
+ <div class="description"><h1>The Loader</h1>
+
+<p>This is the Waigo module loader and is responsible for loading in <br />functionality from the core framework, plugins as well as your application. <br />Whenever you call <code>require('waigo')</code> it is this module which gets returned.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-success radius ctx-type">declaration</div>
+ </p>
+ </section>
+ <pre><code class="language-javascript">var waigoFolder = path.join(__dirname),
+ appFolder = path.join(process.cwd(), 'src'),
+ loader = {};</code></pre>
+ <section id="_walk">
+ <h1>_walk</h1>
+ <div class="description"><p>Walk given folder hierarchy and return all <code>.js</code> files.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-info radius ctx-type">function</div><span class="symbolReturns">-> Promise</span>
+ </p>
+ </section>
+ <pre><code class="language-javascript">var _walk = function(folder) {
+ return new Promise(function(resolve, reject) {
+ var files = {};
+
+ var walker = walk(folder, {
+ followSymlinks: false
+ });
+
+ walker.on('file', function(file, stat) {
+ var extName = path.extname(file);
+ if ('.js' !== extName) return;
+
+ // /x/y/z/abc.js -&gt; /x/y/z/abc
+ var dirname = path.dirname(file),
+ baseName = path.basename(file, extName),
+ moduleName = path.join(path.relative(folder, dirname), baseName);
+
+ files[moduleName] = path.join(dirname, baseName);
+ });
+
+ walker.on('end', function() {
+ resolve(files);
+ });
+ });
+};</code></pre>
+ <section id="getWaigoFolder">
+ <h1>getWaigoFolder</h1>
+ <div class="description"><p>Get absolute path to folder containing Waigo core modules.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-info radius ctx-type">method</div><span class="symbolReturns">-> string</span>
+ </p>
+ </section>
+ <pre><code class="language-javascript">loader.getWaigoFolder = function() {
+ return waigoFolder;
+};</code></pre>
+ <section id="getAppFolder">
+ <h1>getAppFolder</h1>
+ <div class="description"><p>Get absolute path to folder containing application modules.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-info radius ctx-type">method</div><span class="symbolReturns">-> string</span>
+ </p>
+ </section>
+ <pre><code class="language-javascript">loader.getAppFolder = function() {
+ return appFolder;
+};</code></pre>
+ <section id="init">
+ <h1>init</h1>
+ <div class="description"><p>Initialise loader.</p>
+
+<p>This loads available plugins and ensures that there are no instances of any given module being provided by two or <br />more plugins. For more information on how Waigo decides where to load modules from see the <code>load()</code> method docs.</p>
+
+<p>If <code>options.plugins</code> is provided then those named plugins get loaded. If not then the remaining options are used to <br />first work out which plugins to load and then those plugins get loaded. By default the plugin names to load are <br />filtered from the dependencies listed within the <code>package.json</code> file.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-info radius ctx-type">method</div>
+ </p>
+ </section>
+ <table class="params table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width:20%">Option</th>
+ <th style="width:20%">Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="name">{Object}</td>
+ <td class="type">[options]</td>
+ <td class="description">loading configuration.</td>
+ </tr>
+ <tr>
+ <td class="name">{String}</td>
+ <td class="type">[options.appFolder]</td>
+ <td class="description">absolute path to folder containing app files. Overrides the default calculated folder.</td>
+ </tr>
+ <tr>
+ <td class="name">{Object}</td>
+ <td class="type">[options.plugins]</td>
+ <td class="description">plugin loading configuration.</td>
+ </tr>
+ <tr>
+ <td class="name">{Array}</td>
+ <td class="type">[options.plugins.names]</td>
+ <td class="description">plugins to load. If omitted then other options are used to load plugins.</td>
+ </tr>
+ <tr>
+ <td class="name">{Array}</td>
+ <td class="type">[options.plugins.glob]</td>
+ <td class="description">Regexes specifying plugin naming conventions. Default is `waigo-*`.</td>
+ </tr>
+ <tr>
+ <td class="name">{String}</td>
+ <td class="type">[options.plugins.config]</td>
+ <td class="description">JSON config containing names of plugins to load. Default is to load `package.json`.</td>
+ </tr>
+ <tr>
+ <td class="name">{Array}</td>
+ <td class="type">[options.plugins.configKey]</td>
+ <td class="description">Names of keys in JSON config whose values contain names of plugins. Default is `dependencies, devDependencies, peerDependencies`.</td>
+ </tr>
+ </tbody>
+ </table>
+ <pre><code class="language-javascript">loader.init = function*(options) {
+ if (loader.__modules) {
+ debug('Waigo already initialised. Re-initialising...');
+ }
+
+ options = options || {};
+ options.plugins = options.plugins || {};
+
+ appFolder = options.appFolder || appFolder;
+
+ // get loadable plugin
+ if (!options.plugins.names) {
+ debug('Getting plugin names...');
+
+ // based on code from https://github.com/sindresorhus/load-grunt-tasks/blob/master/load-grunt-tasks.js
+ var pattern = options.plugins.glob || ['waigo-*'];
+ var config = options.plugins.config || findup('package.json') || {};
+ var scope = options.plugins.configKey || ['dependencies', 'devDependencies', 'peerDependencies'];
+
+ var names = scope.reduce(function (result, prop) {
+ return result.concat(Object.keys(config[prop] || {}));
+ }, []);
+
+ options.plugins.names = _.uniq(globule.match(pattern, names));
+ }
+
+ debug('Plugins to load: ' + options.plugins.names.join(', '));
+
+ // scan all folder trees and build up the available modules...
+ loader.__modules = {};
+
+ var sourcePaths = {
+ waigo: waigoFolder,
+ app: appFolder
+ };
+
+ _.each(options.plugins.names, function(name) {
+ sourcePaths[name] = path.join( path.dirname(require.resolve(name)), 'src' );
+ });
+
+ var scanOrder = ['waigo'].concat(options.plugins.names, 'app');
+
+ for (var i = 0; i &lt; scanOrder.length; ++i) {
+ var sourceName = scanOrder[i],
+ moduleMap = yield _walk(sourcePaths[sourceName]);
+
+ _.each(moduleMap, function(modulePath, moduleName) {
+ loader.__modules[moduleName] = loader.__modules[moduleName] || {
+ sources: {}
+ };
+ loader.__modules[moduleName].sources[sourceName] = modulePath;
+ });
+ }
+
+ // now go through the list of available modules and ensure that there are no ambiguities
+ _.each(loader.__modules, function(moduleConfig, moduleName) {
+ var sourceNames = Object.keys(moduleConfig.sources);
+
+ // if there is an app implementation then that's the one to use
+ if (moduleConfig.sources.app) {
+ moduleConfig._load = 'app';
+ }
+ // if there is only one source then use that one
+ else if (1 === sourceNames.length) {
+ moduleConfig._load = sourceNames[0];
+ }
+ // else
+ else {
+ // get plugin source names
+ var pluginSources = _.filter(sourceNames, function(srcName) {
+ return 'waigo' !== srcName;
+ });
+
+ // if more than one plugin then we have a problem
+ if (1 &lt; pluginSources.length) {
+ throw new Error('Module &quot;' + moduleName + '&quot; has more than one plugin implementation to choose from: ' + pluginSources.join(', '));
+ }
+ // else the one available plugin is the source
+ else {
+ moduleConfig._load = pluginSources[0];
+ }
+ }
+
+ debug('Module &quot;' + moduleName + '&quot; will be loaded from source &quot;' + moduleConfig._load + '&quot;');
+ });
+};</code></pre>
+ <section id="load">
+ <h1>load</h1>
+ <div class="description"><p>Load a Waigo module.</p>
+
+<p>Module names to load are specified in the form: [module_name:]<module_path></p>
+
+<p>If <code>module_name:</code> is not given then Waigo works out the which version of the module to load based on the <br />following priority order: app folder tree, plugins folder tree, core waigo framework folder tree</p>
+
+<p>Thus an app can completely override any of the framework's built-in files.</p>
+
+<p>If a call to load the <code>support/errors</code> module is made Waigo checks the following paths in order until a <br />file is found:</p>
+
+<p><code>&lt;app folder&gt;/support/errors.js</code><br /><code>&lt;waigo plugin 1&gt;/src/support/errors.js</code><br /><code>&lt;waigo plugin 2&gt;/src/support/errors.js</code><br /><code>&lt;waigo plugin ...&gt;/src/support/errors.js</code><br /><code>&lt;waigo plugin N&gt;/src/support/errors.js</code><br /><code>&lt;waigo module&gt;/src/support/errors.js</code></p>
+
+<p>If the caller wishes to load the version of the module provided by the <code>waigo-doc</code> plugin then the module name <br />should be specified as <code>waigo-doc:support/errors</code>. If on the other hand they wish to load the version provided the <br />core Waigo framework then <code>waigo:support/errors</code> should be used.</p> </div>
+ <h5 class="subheader"></h5>
+ <p>
+ <div class="label label-info radius ctx-type">method</div><span class="symbolReturns">-> Object</span>
+ </p>
+ </section>
+ <table class="params table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width:20%">Option</th>
+ <th style="width:20%">Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="name">{string}</td>
+ <td class="type">moduleName</td>
+ <td class="description">module name in supported format. See the docs for this function for more information. </td>
+ </tr>
+ </tbody>
+ </table>
+ <pre><code class="language-javascript">loader.load = function(moduleName) {
+ if (!loader.__modules) {
+ throw new Error('Please initialise Waigo first');
+ }
+
+ // get source to load from
+ var sanitizedModuleName = moduleName,
+ source = null;
+
+ var sepPos = moduleName.indexOf(':')
+ if (-1 &lt; sepPos) {
+ source = moduleName.substr(0, sepPos);
+ sanitizedModuleName = moduleName.substr(sepPos + 1);
+ }
+
+ if (!loader.__modules[sanitizedModuleName]) {
+ throw new Error('Module not found: ' + sanitizedModuleName);
+ }
+
+ // if no source then use default
+ if (!source) {
+ source = loader.__modules[sanitizedModuleName]._load;
+ }
+
+ if (!loader.__modules[sanitizedModuleName].sources[source]) {
+ throw new Error('Module source not found: ' + source);
+ }
+
+ debug('Loading module &quot;' + sanitizedModuleName + '&quot; from source &quot;' + source + '&quot;');
+
+ return require(loader.__modules[sanitizedModuleName].sources[source]);
+};
+
+
+
+
+module.exports = loader;</code></pre>
+ </div>
+ <div class="col-md-2">
+ <div role="complementary" class="waigo-content-menu hidden-print">
+ <ul class="nav">
+ <li><a href="#waigoFolder"><span>waigoFolder</span></a></li>
+ <li><a href="#_walk"><span>_walk</span></a></li>
+ <li><a href="#getWaigoFolder"><span>getWaigoFolder()</span></a></li>
+ <li><a href="#getAppFolder"><span>getAppFolder()</span></a></li>
+ <li><a href="#init"><span>init()</span></a></li>
+ <li><a href="#load"><span>load()</span></a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </main>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
+
+ </footer>
+ <script type="text/javascript" src="/scripts.js"></script>
+ <script type="text/javascript">
+ var _paq = _paq || [];
+ _paq.push(["setDomains", ["*.waigojs.com","*.waigo.github.io"]]);
+ _paq.push(["trackPageView"]);
+ _paq.push(["enableLinkTracking"]);
+ (function() {
+ var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.hiddentao.com/";
+ _paq.push(["setTrackerUrl", u+"piwik.php"]);
+ _paq.push(["setSiteId", "3"]);
+ var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
+ g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+ })();
+
+ </script>
+ </body>
+</html>
View
9 api/routes.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li class="active"><a href="routes.js.html">routes.js</a></li>
<li><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li class="active"><a href="routes.js.html">routes.js</a></li>
<li><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -100,8 +102,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:42 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/server.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li><a href="routes.js.html">routes.js</a></li>
<li class="active"><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="config/development.js.html">config/development.js</a></li>
<li><a href="config/index.js.html">config/index.js</a></li>
<li><a href="controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="loader.js.html">loader.js</a></li>
<li><a href="routes.js.html">routes.js</a></li>
<li class="active"><a href="server.js.html">server.js</a></li>
<li><a href="support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -274,8 +276,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:42 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:00 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/db/mongoose.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li class="active"><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li class="active"><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -133,8 +135,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:42 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/errors.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -299,8 +301,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:42 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/logging/winston.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -143,8 +145,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:43 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/middleware/errorHandler.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -126,8 +128,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:43 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/middleware/outputFormats.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -137,8 +139,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:43 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/middleware/responseTime.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -98,8 +100,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:43 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/middleware/sessions.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -98,8 +100,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:43 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/outputFormats/html.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -126,8 +128,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:44 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/outputFormats/json.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../config/development.js.html">config/development.js</a></li>
<li><a href="../../config/index.js.html">config/index.js</a></li>
<li><a href="../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../loader.js.html">loader.js</a></li>
<li><a href="../../routes.js.html">routes.js</a></li>
<li><a href="../../server.js.html">server.js</a></li>
<li><a href="../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -127,8 +129,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:44 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:01 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/routeMapper.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../config/development.js.html">config/development.js</a></li>
<li><a href="../config/index.js.html">config/index.js</a></li>
<li><a href="../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../loader.js.html">loader.js</a></li>
<li><a href="../routes.js.html">routes.js</a></li>
<li><a href="../server.js.html">server.js</a></li>
<li><a href="../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -226,8 +228,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:44 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:02 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
9 api/support/session/store/mongo.js.html
@@ -16,8 +16,8 @@
</div>
<div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse">
<ul class="nav navbar-nav">
- <li><a id="guideNavItem" href="/">Guide</a></li>
- <li><a href="/api">API</a></li>
+ <li><a id="guideNavItem" href="/#guide">Guide</a></li>
+ <li class="active"><a href="/api">API</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/waigo/waigo">Github</a></li>
@@ -36,6 +36,7 @@
<li><a href="../../../config/development.js.html">config/development.js</a></li>
<li><a href="../../../config/index.js.html">config/index.js</a></li>
<li><a href="../../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../../loader.js.html">loader.js</a></li>
<li><a href="../../../routes.js.html">routes.js</a></li>
<li><a href="../../../server.js.html">server.js</a></li>
<li><a href="../../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -59,6 +60,7 @@
<li><a href="../../../config/development.js.html">config/development.js</a></li>
<li><a href="../../../config/index.js.html">config/index.js</a></li>
<li><a href="../../../controllers/main.js.html">controllers/main.js</a></li>
+ <li><a href="../../../loader.js.html">loader.js</a></li>
<li><a href="../../../routes.js.html">routes.js</a></li>
<li><a href="../../../server.js.html">server.js</a></li>
<li><a href="../../../support/db/mongoose.js.html">support/db/mongoose.js</a></li>
@@ -127,8 +129,7 @@ <h5 class="subheader"></h5>
</div>
</div>
</main>
- <footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:44 GMT</p>
+ <footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:02 GMT</p>
</footer>
<script type="text/javascript" src="/scripts.js"></script>
View
5 index.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" charset="utf-8"><title>Waigo.js</title><!--[if IE]><link rel="shortcut icon" href="img/logo_32x32.ico" /><![endif]--><link rel="shortcut icon" href="/img/logo_114x114.png"><meta name="msapplication-TileColor" content="#fff"><meta name="msapplication-TileImage" content="/img/logo_144x144.png"><link rel="stylesheet" media="screen" href="/style.css"></head><body><header id="top" role="banner" class="navbar navbar-static-top"><div class="container"><div class="navbar-header"><button type="button" data-toggle="collapse" data-target=".topmenu-navbar-collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/" class="navbar-brand">Waigo</a></div><div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse"><ul class="nav navbar-nav"><li><a id="guideNavItem" href="/">Guide</a></li><li><a href="/api">API</a></li></ul><ul class="nav navbar-nav navbar-right"><li><a href="https://github.com/waigo/waigo">Github</a></li></ul></div></div></header><main id="content"><section id="banner"><div class="container"><div class="waigo-intro-banner"><div class="rays"> </div><div class="text"><h1>W</h1><p>Next-gen MVC framework for Node.js</p><ul class="meta"><li>v0.3.0</li><li><a href="https://github.com/waigo/waigo">github</a></li><li><a href="https://twitter.com/hiddentao">twitter</a></li></ul></div></div></div></section><section id="guide"><div class="container"><div class="row"><div role="main" class="col-md-9 waigo-guide-content"><div><h1 id="what-is-waigo-">What is Waigo?</h1>
+<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" charset="utf-8"><title>Waigo.js</title><!--[if IE]><link rel="shortcut icon" href="img/logo_32x32.ico" /><![endif]--><link rel="shortcut icon" href="/img/logo_114x114.png"><meta name="msapplication-TileColor" content="#fff"><meta name="msapplication-TileImage" content="/img/logo_144x144.png"><link rel="stylesheet" media="screen" href="/style.css"></head><body><header id="top" role="banner" class="navbar navbar-static-top"><div class="container"><div class="navbar-header"><button type="button" data-toggle="collapse" data-target=".topmenu-navbar-collapse" class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/" class="navbar-brand">Waigo</a></div><div role="navigation" class="collapse navbar-collapse topmenu-navbar-collapse"><ul class="nav navbar-nav"><li class="active"><a id="guideNavItem" href="/#guide">Guide</a></li><li><a href="/api">API</a></li></ul><ul class="nav navbar-nav navbar-right"><li><a href="https://github.com/waigo/waigo">Github</a></li></ul></div></div></header><main id="content"><section id="banner"><div class="container"><div class="waigo-intro-banner"><div class="rays"> </div><div class="text"><h1>W</h1><p>Next-gen MVC framework for Node.js</p><ul class="meta"><li>v0.3.0</li><li><a href="https://github.com/waigo/waigo">github</a></li><li><a href="https://twitter.com/hiddentao">twitter</a></li></ul></div></div></div></section><section id="guide"><div class="container"><div class="row"><div role="main" class="col-md-9 waigo-guide-content"><div><h1 id="what-is-waigo-">What is Waigo?</h1>
<p><a href="http://travis-ci.org/waigo/waigo"><img src="https://secure.travis-ci.org/waigo/waigo.png" alt="Build Status"></a> <a href="https://npmjs.org/package/waigo"><img src="https://badge.fury.io/js/waigo.png" alt="NPM module"></a> <a href="https://codeclimate.com/github/waigo/waigo"><img src="https://codeclimate.com/github/waigo/waigo.png" alt="Code quality"></a></p>
<p>Waigo is a flexible MVC framework for building scalable and maintainable web applications.</p>
<p>Based on <a href="http://koajs.com">koa</a>, it uses <a href="http://tobyho.com/2013/06/16/what-are-generators/">generators</a> for asynchronous programming, removing the need for callbacks. Almost every aspect of the core framework can be easily extended or overridden.</p>
@@ -301,8 +301,7 @@ <h1 id="contributing">Contributing</h1>
<p>Suggestions, bug reports and pull requests are welcome. Please see <a href="https://github.com/waigo/waigo/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a> for guidelines.</p>
<h1 id="license">License</h1>
<p>MIT - see <a href="https://github.com/waigo/waigo/blob/master/LICENSE.md">LICENSE.md</a></p>
-</div></div><div class="col-md-3"><div role="complementary" class="waigo-content-menu hidden-print"><ul class="nav"><li><a href="#what-is-waigo-">What is Waigo?</a></li><li><a href="#getting-started">Getting started</a><ul class="nav"><li><a href="#installation">Installation</a></li><li><a href="#hello-world">Hello world</a></li></ul></li><li><a href="#extend-and-override">Extend and Override</a><ul class="nav"><li><a href="#plugins">Plugins</a></li></ul></li><li><a href="#configuration">Configuration</a></li><li><a href="#routing">Routing</a><ul class="nav"><li><a href="#middleware">Middleware</a></li></ul></li><li><a href="#controllers">Controllers</a></li><li><a href="#models">Models</a><ul class="nav"><li><a href="#sessions">Sessions</a></li></ul></li><li><a href="#views">Views</a></li><li><a href="#logging">Logging</a><ul class="nav"><li><a href="#error-handling">Error handling</a></li><li><a href="#debugging">Debugging</a></li></ul></li><li><a href="#contributing">Contributing</a></li><li><a href="#license">License</a></li></ul><ul class="nav"><li class="back-to-top"><a href="#banner">Back to top</a></li></ul></div></div></div></div></section></main><footer role="contentinfo"><p>Built by <a href="http://hiddentao.com">hiddentao</a></p>
-<p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Tue, 25 Feb 2014 10:39:48 GMT</p>
+</div></div><div class="col-md-3"><div role="complementary" class="waigo-content-menu hidden-print"><ul class="nav"><li><a href="#what-is-waigo-">What is Waigo?</a></li><li><a href="#getting-started">Getting started</a><ul class="nav"><li><a href="#installation">Installation</a></li><li><a href="#hello-world">Hello world</a></li></ul></li><li><a href="#extend-and-override">Extend and Override</a><ul class="nav"><li><a href="#plugins">Plugins</a></li></ul></li><li><a href="#configuration">Configuration</a></li><li><a href="#routing">Routing</a><ul class="nav"><li><a href="#middleware">Middleware</a></li></ul></li><li><a href="#controllers">Controllers</a></li><li><a href="#models">Models</a><ul class="nav"><li><a href="#sessions">Sessions</a></li></ul></li><li><a href="#views">Views</a></li><li><a href="#logging">Logging</a><ul class="nav"><li><a href="#error-handling">Error handling</a></li><li><a href="#debugging">Debugging</a></li></ul></li><li><a href="#contributing">Contributing</a></li><li><a href="#license">License</a></li></ul><ul class="nav"><li class="back-to-top"><a href="#banner">Back to top</a></li></ul></div></div></div></div></section></main><footer role="contentinfo"><p>This page was <a href="https://github.com/waigo/waigojs.com-generator">generated</a> on Wed, 26 Feb 2014 11:13:02 GMT</p>
</footer><script type="text/javascript" src="/scripts.js"></script><script type="text/javascript">var _paq = _paq || [];
_paq.push(["setDomains", ["*.waigojs.com","*.waigo.github.io"]]);
_paq.push(["trackPageView"]);
View
2  style.css
1 addition, 1 deletion not shown
Please sign in to comment.
Something went wrong with that request. Please try again.