Skip to content
Browse files

updating emily + requirejs + bumped npm version

  • Loading branch information...
1 parent c3d46db commit 5c108a3a5cfc9f2f618b757233ca876c660c92d2 @podefr podefr committed Mar 13, 2013
Showing with 9,905 additions and 28,627 deletions.
  1. +6 −0 CHANGELOG.md
  2. +8 −8 build/LICENSE
  3. +2,279 −2,279 build/Olives-map
  4. +18 −17 build/Olives.js
  5. +2 −2 build/Olives.min.js
  6. +1 −1 build/src/Bind.plugin.js
  7. +5 −5 build/src/DomUtils.js
  8. +1 −1 build/src/Event.plugin.js
  9. +1 −1 build/src/LocalStore.js
  10. +5 −5 build/src/OObject.js
  11. +1 −1 build/src/Place.plugin.js
  12. +1 −1 build/src/Plugins.js
  13. +1 −1 build/src/SocketIOTransport.js
  14. +1 −1 docs/latest/files.html
  15. +2 −2 docs/latest/index.html
  16. +1 −1 docs/latest/symbols/LocalStore.html
  17. +1 −1 docs/latest/symbols/ModelPlugin.html
  18. +3 −3 docs/latest/symbols/OObject.html
  19. +1 −1 docs/latest/symbols/Plugins.html
  20. +1 −1 docs/latest/symbols/Transport.html
  21. +1 −1 docs/latest/symbols/_global_.html
  22. +1 −1 docs/latest/symbols/src/src_Bind.plugin.js.html
  23. +5 −5 docs/latest/symbols/src/src_DomUtils.js.html
  24. +1 −1 docs/latest/symbols/src/src_Event.plugin.js.html
  25. +1 −1 docs/latest/symbols/src/src_LocalStore.js.html
  26. +5 −5 docs/latest/symbols/src/src_OObject.js.html
  27. +1 −1 docs/latest/symbols/src/src_Place.plugin.js.html
  28. +1 −1 docs/latest/symbols/src/src_Plugins.js.html
  29. +1 −1 docs/latest/symbols/src/src_SocketIOTransport.js.html
  30. +187 −86 lib/Emily.js
  31. +30 −30 lib/require.js
  32. +9 −9 node_modules/emily/LICENSE
  33. +1,108 −0 node_modules/emily/README.md
  34. +1,959 −0 node_modules/emily/build/Emily-map
  35. +1,370 −0 node_modules/emily/build/Emily.js
  36. +26 −0 node_modules/emily/build/Emily.min.js
  37. +21 −0 node_modules/emily/build/LICENSE
  38. +128 −0 node_modules/emily/build/src/Observable.js
  39. +265 −0 node_modules/emily/build/src/Promise.js
  40. +251 −0 node_modules/emily/build/src/StateMachine.js
  41. +298 −0 node_modules/emily/build/src/Store.js
  42. +307 −0 node_modules/emily/build/src/Tools.js
  43. +108 −0 node_modules/emily/build/src/Transport.js
  44. +7 −73 node_modules/emily/emily-server.js
  45. +0 −1 node_modules/emily/node_modules/.bin/r.js
  46. +0 −1 node_modules/emily/node_modules/cookie/.npmignore
  47. +0 −3 node_modules/emily/node_modules/cookie/.travis.yml
  48. +0 −44 node_modules/emily/node_modules/cookie/README.md
  49. +0 −57 node_modules/emily/node_modules/cookie/index.js
  50. +0 −32 node_modules/emily/node_modules/cookie/package.json
  51. +0 −1 node_modules/emily/node_modules/cookie/test/mocha.opts
  52. +0 −25 node_modules/emily/node_modules/cookie/test/parse.js
  53. +0 −59 node_modules/emily/node_modules/cookie/test/serialize.js
  54. +0 −9 node_modules/emily/node_modules/requirejs/README.md
  55. +0 −23,452 node_modules/emily/node_modules/requirejs/bin/r.js
  56. +0 −32 node_modules/emily/node_modules/requirejs/package.json
  57. +0 −1,993 node_modules/emily/node_modules/requirejs/require.js
  58. +13 −14 node_modules/emily/package.json
  59. +1,390 −311 node_modules/requirejs/bin/r.js
  60. +3 −3 node_modules/requirejs/package.json
  61. +61 −35 node_modules/requirejs/require.js
  62. +4 −4 package.json
  63. +4 −4 tests.html
View
6 CHANGELOG.md
@@ -1,3 +1,9 @@
+1.3.2 - 15 MAR 2013
+-------------------
+
+* Incorporating 1.3.1 changes, tests + docs clean up
+* Updated Emily
+
1.3.0 - 17 DEC 2012
-------------------
View
16 build/LICENSE
@@ -1,19 +1,19 @@
/**
* @license Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or substantial
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
- */
+ */
View
4,558 build/Olives-map
2,279 additions, 2,279 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
35 build/Olives.js
@@ -1,12 +1,13 @@
/**
* @license Olives <VERSION> http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
+
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('DomUtils',["Tools"], function (Tools) {
@@ -97,13 +98,13 @@ define('DomUtils',["Tools"], function (Tools) {
},
/**
- * Determine if an element matche a certain CSS selector.
- * @param {Element} the node to check out
- * @param {String} CSS selector
+ * Determine if an element matches a certain CSS selector.
* @param {Element} the parent node
+ * @param {String} CSS selector
+ * @param {Element} the node to check out
* @param true if matches
*/
- matches : function matches(node, selector, parent){
+ matches : function matches(parent, selector, node){
return Tools.toArray(this.getNodes(parent, selector)).indexOf(node) > -1;
}
@@ -114,7 +115,7 @@ define('DomUtils',["Tools"], function (Tools) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('Bind.plugin',["Store", "Observable", "Tools", "DomUtils"],
@@ -730,7 +731,7 @@ function ModelPlugin(Store, Observable, Tools, DomUtils) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('Event.plugin',["DomUtils"], function (Utils) {
@@ -845,7 +846,7 @@ define('Event.plugin',["DomUtils"], function (Utils) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('LocalStore',["Store", "Tools"],
@@ -948,7 +949,7 @@ function LocalStore(Store, Tools) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('Plugins',["Tools", "DomUtils"],
@@ -1102,23 +1103,23 @@ function Plugins(Tools, DomUtils) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('OObject',["StateMachine", "Store", "Plugins", "DomUtils", "Tools"],
/**
* @class
-* OObject is an abstract class that any UI can inherit from.
-* It should provide code that is easy to reuse
+* OObject is a container for dom elements. It will also bind
+* the dom to additional plugins like Data binding
* @requires StateMachine
*/
function OObject(StateMachine, Store, Plugins, DomUtils, Tools) {
return function OObjectConstructor(otherStore) {
/**
- * This function creates the dom of the UI from it's template
- * It then queries the dom for data-model to list them into this.connects
+ * This function creates the dom of the UI from its template
+ * It then queries the dom for data- attributes
* It can't be executed if the template is not set
* @private
*/
@@ -1294,7 +1295,7 @@ function OObject(StateMachine, Store, Plugins, DomUtils, Tools) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('Place.plugin',["OObject", "Tools"],
@@ -1341,7 +1342,7 @@ function (OObject, Tools) {
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define('SocketIOTransport',["Observable", "Tools"],
View
4 build/Olives.min.js
@@ -1,10 +1,10 @@
/*
Olives <VERSION> http://flams.github.com/olives
The MIT License (MIT)
- Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define("DomUtils",["Tools"],function(i){return{getNodes:function(c,d){return this.isAcceptedType(c)?(c.parentNode||document.createDocumentFragment().appendChild(c),c.parentNode.querySelectorAll(d||"*")):false},getDataset:function(c){var d=0,e,f={},b,a;if(this.isAcceptedType(c))if(c.hasOwnProperty("dataset"))return c.dataset;else{for(e=c.attributes.length;d<e;d++)b=c.attributes[d].name.split("-"),b.shift()=="data"&&(f[a=b.join("-")]=c.getAttribute("data-"+a));return f}else return false},isAcceptedType:function(c){return c instanceof
-HTMLElement||c instanceof SVGElement?true:false},setAttribute:function(c,d,e){return c instanceof HTMLElement?(c[d]=e,true):c instanceof SVGElement?(c.setAttribute(d,e),true):false},matches:function(c,d,e){return i.toArray(this.getNodes(e,d)).indexOf(c)>-1}}});
+HTMLElement||c instanceof SVGElement?true:false},setAttribute:function(c,d,e){return c instanceof HTMLElement?(c[d]=e,true):c instanceof SVGElement?(c.setAttribute(d,e),true):false},matches:function(c,d,e){return i.toArray(this.getNodes(c,d)).indexOf(e)>-1}}});
define("Bind.plugin",["Store","Observable","Tools","DomUtils"],function(i,c,d,e){return function(c,b){var a=null,h={},j={};this.observers={};this.setModel=function(b){return b instanceof i?(a=b,true):false};this.getModel=function(){return a};this.ItemRenderer=function(b,k){var g=null,h=null,c=null,f=null,j=null;this.setRenderer=function(a){g=a;return true};this.getRenderer=function(){return g};this.setRootNode=function(a){return e.isAcceptedType(a)?(c=a,a=c.querySelector("*"),this.setRenderer(a),
a&&c.removeChild(a),true):false};this.getRootNode=function(){return c};this.setPlugins=function(a){h=a;return true};this.getPlugins=function(){return h};this.items=new i([]);this.setStart=function(a){return f=parseInt(a,10)};this.getStart=function(){return f};this.setNb=function(a){return j=a=="*"?a:parseInt(a,10)};this.getNb=function(){return j};this.addItem=function(a){var b;return typeof a=="number"&&!this.items.get(a)?(b=this.create(a))?((a=this.getNextItem(a))?c.insertBefore(b,a):c.appendChild(b),
true):false:false};this.getNextItem=function(a){return this.items.alter("slice",a+1).filter(function(a){if(e.isAcceptedType(a))return true})[0]};this.removeItem=function(a){var b=this.items.get(a);return b?(c.removeChild(b),this.items.set(a),true):false};this.create=function(b){if(a.has(b)){var k=g.cloneNode(true),l=e.getNodes(k);d.toArray(l).forEach(function(a){a.setAttribute("data-"+h.name+"_id",b)});this.items.set(b,k);h.apply(k);return k}};this.render=function(){var b=j=="*"?a.getNbItems():j,
View
2 build/src/Bind.plugin.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["Store", "Observable", "Tools", "DomUtils"],
View
10 build/src/DomUtils.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["Tools"], function (Tools) {
@@ -92,13 +92,13 @@ define(["Tools"], function (Tools) {
},
/**
- * Determine if an element matche a certain CSS selector.
- * @param {Element} the node to check out
- * @param {String} CSS selector
+ * Determine if an element matches a certain CSS selector.
* @param {Element} the parent node
+ * @param {String} CSS selector
+ * @param {Element} the node to check out
* @param true if matches
*/
- matches : function matches(node, selector, parent){
+ matches : function matches(parent, selector, node){
return Tools.toArray(this.getNodes(parent, selector)).indexOf(node) > -1;
}
View
2 build/src/Event.plugin.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["DomUtils"], function (Utils) {
View
2 build/src/LocalStore.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["Store", "Tools"],
View
10 build/src/OObject.js
@@ -1,23 +1,23 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["StateMachine", "Store", "Plugins", "DomUtils", "Tools"],
/**
* @class
-* OObject is an abstract class that any UI can inherit from.
-* It should provide code that is easy to reuse
+* OObject is a container for dom elements. It will also bind
+* the dom to additional plugins like Data binding
* @requires StateMachine
*/
function OObject(StateMachine, Store, Plugins, DomUtils, Tools) {
return function OObjectConstructor(otherStore) {
/**
- * This function creates the dom of the UI from it's template
- * It then queries the dom for data-model to list them into this.connects
+ * This function creates the dom of the UI from its template
+ * It then queries the dom for data- attributes
* It can't be executed if the template is not set
* @private
*/
View
2 build/src/Place.plugin.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["OObject", "Tools"],
View
2 build/src/Plugins.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["Tools", "DomUtils"],
View
2 build/src/SocketIOTransport.js
@@ -1,7 +1,7 @@
/**
* Olives http://flams.github.com/olives
* The MIT License (MIT)
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com> - Olivier Wietrich <olivier.wietrich@gmail.com>
*/
define(["Observable", "Tools"],
View
2 docs/latest/files.html
@@ -304,7 +304,7 @@ <h1 class="classTitle">File Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
4 docs/latest/index.html
@@ -226,7 +226,7 @@ <h1 class="classTitle">Class Index</h1>
<div>
<h2><a href="symbols/OObject.html">OObject</a></h2>
- OObject is an abstract class that any UI can inherit from.
+ OObject is a container for dom elements.
</div>
<hr />
@@ -246,7 +246,7 @@ <h1 class="classTitle">Class Index</h1>
</div>
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/LocalStore.html
@@ -398,7 +398,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/ModelPlugin.html
@@ -871,7 +871,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
6 docs/latest/symbols/OObject.html
@@ -218,8 +218,8 @@ <h1 class="classTitle">
- OObject is an abstract class that any UI can inherit from.
-It should provide code that is easy to reuse
+ OObject is a container for dom elements. It will also bind
+the dom to additional plugins like Data binding
<br /><i>Defined in: </i> <a href="../symbols/src/src_OObject.js.html">OObject.js</a>.
@@ -729,7 +729,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/Plugins.html
@@ -632,7 +632,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/Transport.html
@@ -790,7 +790,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:07 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/_global_.html
@@ -313,7 +313,7 @@ <h1 class="classTitle">
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Jan 22 2013 22:38:51 GMT-0000 (GMT)
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Mar 13 2013 22:36:06 GMT-0000 (GMT)
</div>
</body>
</html>
View
2 docs/latest/symbols/src/src_Bind.plugin.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"Store"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Observable"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Tools"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"DomUtils"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
View
10 docs/latest/symbols/src/src_DomUtils.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"Tools"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Tools</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
@@ -99,13 +99,13 @@
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 93</span>
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="COMM">/**
-<span class='line'> 95</span> * Determine if an element matche a certain CSS selector.
-<span class='line'> 96</span> * @param {Element} the node to check out
+<span class='line'> 95</span> * Determine if an element matches a certain CSS selector.
+<span class='line'> 96</span> * @param {Element} the parent node
<span class='line'> 97</span> * @param {String} CSS selector
-<span class='line'> 98</span> * @param {Element} the parent node
+<span class='line'> 98</span> * @param {Element} the node to check out
<span class='line'> 99</span> * @param true if matches
<span class='line'>100</span> */</span><span class="WHIT">
-<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">matches</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">matches</span><span class="PUNC">(</span><span class="NAME">node</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">selector</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
+<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">matches</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">matches</span><span class="PUNC">(</span><span class="NAME">parent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">selector</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">node</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Tools.toArray</span><span class="PUNC">(</span><span class="NAME">this.getNodes</span><span class="PUNC">(</span><span class="NAME">parent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">selector</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">node</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>104</span>
View
2 docs/latest/symbols/src/src_Event.plugin.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"DomUtils"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">Utils</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
View
2 docs/latest/symbols/src/src_LocalStore.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"Store"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Tools"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
View
10 docs/latest/symbols/src/src_OObject.js.html
@@ -8,23 +8,23 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"StateMachine"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Store"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Plugins"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"DomUtils"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Tools"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 8</span> </span><span class="COMM">/**
<span class='line'> 9</span> * @class
-<span class='line'> 10</span> * OObject is an abstract class that any UI can inherit from.
-<span class='line'> 11</span> * It should provide code that is easy to reuse
+<span class='line'> 10</span> * OObject is a container for dom elements. It will also bind
+<span class='line'> 11</span> * the dom to additional plugins like Data binding
<span class='line'> 12</span> * @requires StateMachine
<span class='line'> 13</span> */</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">OObject</span><span class="PUNC">(</span><span class="NAME">StateMachine</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Store</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Plugins</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">DomUtils</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Tools</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 15</span>
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">OObjectConstructor</span><span class="PUNC">(</span><span class="NAME">otherStore</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 17</span>
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="COMM">/**
-<span class='line'> 19</span> * This function creates the dom of the UI from it's template
-<span class='line'> 20</span> * It then queries the dom for data-model to list them into this.connects
+<span class='line'> 19</span> * This function creates the dom of the UI from its template
+<span class='line'> 20</span> * It then queries the dom for data- attributes
<span class='line'> 21</span> * It can't be executed if the template is not set
<span class='line'> 22</span> * @private
<span class='line'> 23</span> */</span><span class="WHIT">
View
2 docs/latest/symbols/src/src_Place.plugin.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"OObject"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Tools"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
View
2 docs/latest/symbols/src/src_Plugins.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"Tools"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"DomUtils"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
View
2 docs/latest/symbols/src/src_SocketIOTransport.js.html
@@ -8,7 +8,7 @@
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
<span class='line'> 2</span> * Olives http://flams.github.com/olives
<span class='line'> 3</span> * The MIT License (MIT)
-<span class='line'> 4</span> * Copyright (c) 2012 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
+<span class='line'> 4</span> * Copyright (c) 2012-2013 Olivier Scherrer &lt;pode.fr@gmail.com> - Olivier Wietrich &lt;olivier.wietrich@gmail.com>
<span class='line'> 5</span> */</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="NAME">define</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="STRN">"Observable"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"Tools"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
View
273 lib/Emily.js
@@ -2,12 +2,13 @@
* @license Emily <VERSION> http://flams.github.com/emily
*
* The MIT License (MIT)
- *
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ *
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
*/
+
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
@@ -33,9 +34,10 @@ function Tools(){
/**
* Mixes an object into another
- * @param {Object} destination object to mix values into
* @param {Object} source object to get values from
+ * @param {Object} destination object to mix values into
* @param {Boolean} optional, set to true to prevent overriding
+ * @returns {Object} the destination object
*/
mixin: function mixin(source, destination, dontOverride) {
this.loop(source, function (value, idx) {
@@ -97,7 +99,7 @@ function Tools(){
* @returns {Array}
*/
toArray: function toArray(array) {
- return Array.prototype.slice.call(array);
+ return [].slice.call(array);
},
/**
@@ -314,7 +316,7 @@ function Tools(){
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
@@ -346,7 +348,7 @@ function Observable(Tools) {
* @param {String} topic the topic to observe
* @param {Function} callback the callback to execute
* @param {Object} scope the scope in which to execute the callback
- * @returns handler
+ * @returns handle
*/
this.watch = function watch(topic, callback, scope) {
if (typeof callback == "function") {
@@ -363,11 +365,11 @@ function Observable(Tools) {
/**
* Remove an observer
- * @param {Handler} handler returned by the watch method
+ * @param {Handle} handle returned by the watch method
* @returns {Boolean} true if there were subscribers
*/
- this.unwatch = function unwatch(handler) {
- var topic = handler[0], idx = handler[1];
+ this.unwatch = function unwatch(handle) {
+ var topic = handle[0], idx = handle[1];
if (_topics[topic] && _topics[topic][idx]) {
// delete value so the indexes don't move
delete _topics[topic][idx];
@@ -407,11 +409,11 @@ function Observable(Tools) {
/**
* Check if topic has the described observer
- * @param {Handler}
+ * @param {Handle}
* @returns {Boolean} true if exists
*/
- this.hasObserver = function hasObserver(handler) {
- return !!( handler && _topics[handler[0]] && _topics[handler[0]][handler[1]]);
+ this.hasObserver = function hasObserver(handle) {
+ return !!( handle && _topics[handle[0]] && _topics[handle[0]][handle[1]]);
};
/**
@@ -443,7 +445,7 @@ function Observable(Tools) {
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
@@ -511,9 +513,8 @@ function StateMachine(Tools) {
if (!_states[name]) {
return _states[name] = new Transition();
} else {
- return false;
+ return _states[name];
}
-
};
/**
@@ -535,6 +536,29 @@ function StateMachine(Tools) {
};
/**
+ * Tell if the state machine has the given state
+ * @param {String} state the name of the state
+ * @returns {Boolean} true if it has the given state
+ */
+ this.has = function has(state) {
+ return _states.hasOwnProperty(state);
+ };
+
+ /**
+ * Advances the state machine to a given state
+ * @param {String} state the name of the state to advance the state machine to
+ * @returns {Boolean} true if it has the given state
+ */
+ this.advance = function advance(state) {
+ if (this.has(state)) {
+ _currentState = state;
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ /**
* Pass an event to the state machine
* @param {String} name the name of the event
* @returns {Boolean} true if the event exists in the current state
@@ -673,14 +697,14 @@ function StateMachine(Tools) {
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
define('Promise',["Observable", "StateMachine"],
/**
* @class
- * Create a Promise
+ * Create a promise/A+
*/
function Promise(Observable, StateMachine) {
@@ -704,55 +728,63 @@ function Promise(Observable, StateMachine) {
*/
_observable = new Observable,
+ /**
+ * The state machine States & transitions
+ * @private
+ */
_states = {
- // The promise is unresolved
- "Unresolved": [
+ // The promise is pending
+ "Pending": [
- // It can only be fulfilled when unresolved
- ["fulfill", function (value) {
+ // It can only be fulfilled when pending
+ ["fulfill", function onFulfill(value) {
_value = value;
_observable.notify("fulfill", value);
// Then it transits to the fulfilled state
}, "Fulfilled"],
- // it can only be rejected when unresolved
- ["reject", function (reason) {
+ // it can only be rejected when pending
+ ["reject", function onReject(reason) {
_reason = reason;
_observable.notify("reject", reason);
// Then it transits to the rejected state
}, "Rejected"],
// When pending, add the resolver to an observable
- ["toFulfill", function (resolver) {
+ ["toFulfill", function toFulfill(resolver) {
_observable.watch("fulfill", resolver);
}],
// When pending, add the resolver to an observable
- ["toReject", function (resolver) {
+ ["toReject", function toReject(resolver) {
_observable.watch("reject", resolver);
}]],
// When fulfilled,
"Fulfilled": [
// We directly call the resolver with the value
- ["toFulfill", function (resolver) {
- resolver(_value);
+ ["toFulfill", function toFulfill(resolver) {
+ setTimeout(function () {
+ resolver(_value);
+ }, 0);
}]],
// When rejected
"Rejected": [
// We directly call the resolver with the reason
- ["toReject", function (resolver) {
- resolver(_reason);
+ ["toReject", function toReject(resolver) {
+ setTimeout(function () {
+ resolver(_reason);
+ }, 0);
}]]
},
/**
* The stateMachine
* @private
*/
- _stateMachine = new StateMachine("Unresolved", _states);
+ _stateMachine = new StateMachine("Pending", _states);
/**
* Fulfilled the promise.
@@ -830,21 +862,68 @@ function Promise(Observable, StateMachine) {
};
/**
+ * Synchronize this promise with a thenable
+ * @returns {Boolean} false if the given sync is not a thenable
+ */
+ this.sync = function sync(syncWith) {
+ if (syncWith instanceof Object && syncWith.then) {
+
+ var onFulfilled = function onFulfilled(value) {
+ this.fulfill(value);
+ },
+ onRejected = function onRejected(reason) {
+ this.reject(reason);
+ };
+
+ syncWith.then(onFulfilled.bind(this),
+ onRejected.bind(this));
+
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ /**
* Make a resolver
* for debugging only
* @private
* @returns {Function} a closure
*/
- this.makeResolver = function (promise, func, scope) {
+ this.makeResolver = function makeResolver(promise, func, scope) {
return function resolver(value) {
+ var returnedPromise;
+
try {
- promise.fulfill(func.call(scope, value));
+ returnedPromise = func.call(scope, value);
+ if (!promise.sync(returnedPromise)) {
+ promise.fulfill(returnedPromise);
+ }
} catch (err) {
promise.reject(err);
}
+
}
};
+ /**
+ * Returns the reason
+ * for debugging only
+ * @private
+ */
+ this.getReason = function getReason() {
+ return _reason;
+ };
+
+ /**
+ * Returns the reason
+ * for debugging only
+ * @private
+ */
+ this.getValue = function getValue() {
+ return _value;
+ };
+
/**
* Get the promise's observable
* for debugging only
@@ -875,14 +954,6 @@ function Promise(Observable, StateMachine) {
return _states;
};
- this.getValue = function getValue() {
- return _value;
- };
-
- this.getReason = function getReason() {
- return _reason;
- };
-
}
@@ -892,22 +963,21 @@ function Promise(Observable, StateMachine) {
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
define('Store',["Observable", "Tools"],
/**
* @class
- * Store creates a small NoSQL database with observables
- * It can publish events on store/data changes
+ * Store creates an observable structure based on a key/values object
+ * or on an array
*/
function Store(Observable, Tools) {
/**
* Defines the Store
- * @private
- * @param values
+ * @param {Array/Object} the data to initialize the store with
* @returns
*/
return function StoreConstructor($data) {
@@ -919,18 +989,21 @@ define('Store',["Observable", "Tools"],
var _data = Tools.clone($data) || {},
/**
- * The observable
+ * The observable for publishing changes on the store iself
* @private
*/
_storeObservable = new Observable(),
+ /**
+ * The observable for publishing changes on a value
+ * @private
+ */
_valueObservable = new Observable(),
/**
* Gets the difference between two objects and notifies them
* @private
- * @param previousData
- * @returns
+ * @param {Object} previousData
*/
_notifyDiffs = function _notifyDiffs(previousData) {
var diffs = Tools.objectsDiffs(previousData, _data);
@@ -953,6 +1026,12 @@ define('Store',["Observable", "Tools"],
};
/**
+ * Count is an alias for getNbItems
+ * @returns {Number} the number of items in the store
+ */
+ this.count = this.getNbItems;
+
+ /**
* Get a value from its index
* @param {String} name the name of the index
* @returns the value
@@ -977,15 +1056,17 @@ define('Store',["Observable", "Tools"],
* @returns true if value is set
*/
this.set = function set(name, value) {
- var ante,
+ var hasPrevious,
+ previousValue,
action;
if (typeof name != "undefined") {
- ante = this.has(name);
+ hasPrevious = this.has(name);
+ previousValue = this.get(name);
_data[name] = value;
- action = ante ? "updated" : "added";
- _storeObservable.notify(action, name, _data[name]);
- _valueObservable.notify(name, _data[name], action);
+ action = hasPrevious ? "updated" : "added";
+ _storeObservable.notify(action, name, _data[name], previousValue);
+ _valueObservable.notify(name, _data[name], action, previousValue);
return true;
} else {
return false;
@@ -1040,7 +1121,9 @@ define('Store',["Observable", "Tools"],
// Indexes must be removed from the greatest to the lowest
// To avoid trying to remove indexes that don't exist.
// i.e: given [0, 1, 2], remove 1, then 2, 2 doesn't exist anymore
- indexes.sort(Tools.compareNumbers).reverse().forEach(this.del, this);
+ indexes.sort(Tools.compareNumbers)
+ .reverse()
+ .forEach(this.del, this);
return true;
} else {
return false;
@@ -1068,23 +1151,28 @@ define('Store',["Observable", "Tools"],
};
/**
+ * proxy is an alias for alter
+ */
+ this.proxy = this.alter;
+
+ /**
* Watch the store's modifications
* @param {String} added/updated/deleted
* @param {Function} func the function to execute
* @param {Object} scope the scope in which to execute the function
- * @returns {Handler} the subscribe's handler to use to stop watching
+ * @returns {Handle} the subscribe's handler to use to stop watching
*/
this.watch = function watch(name, func, scope) {
return _storeObservable.watch(name, func, scope);
};
/**
* Unwatch the store modifications
- * @param {Handler} handler the handler returned by the watch function
+ * @param {Handle} handle the handler returned by the watch function
* @returns
*/
- this.unwatch = function unwatch(handler) {
- return _storeObservable.unwatch(handler);
+ this.unwatch = function unwatch(handle) {
+ return _storeObservable.unwatch(handle);
};
/**
@@ -1154,33 +1242,42 @@ define('Store',["Observable", "Tools"],
};
/**
- * Dumps a JSON version of all the data
- * @returns {JSON}
+ * Returns a JSON version of the data
+ * Use dump if you want all the data as a plain js object
+ * @returns {String} the JSON
*/
this.toJSON = function toJSON() {
return JSON.stringify(_data);
};
+
+ /**
+ * Returns the store's data
+ * @returns {Object} the data
+ */
+ this.dump = function dump() {
+ return _data;
+ };
};
});
/**
* Emily
- * Copyright(c) 2012 Olivier Scherrer <pode.fr@gmail.com>
+ * Copyright(c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
* MIT Licensed
*/
-define('Transport',["Store"],
+define('Transport',[],
/**
* @class
- * Transport creates the link between your requests and Emily's requests handlers.
- * A request handler can be defined to make requets of any kind as long as it's supported
- * by your node.js. (HTTP, FileSystem, SIP...)
+ * Transport hides and centralizes the logic behind requests.
+ * It can issue requests to request handlers, which in turn can issue requests
+ * to anything your node.js server has access to (HTTP, FileSystem, SIP...)
*/
-function Transport(Store) {
+function Transport() {
/**
* Create a Transport
- * @param {Object} $reqHandlers the requestHandler defined in your node.js app
+ * @param {Emily Store} [optionanl] $reqHandlers an object containing the request handlers
* @returns
*/
return function TransportConstructor($reqHandlers) {
@@ -1192,8 +1289,8 @@ function Transport(Store) {
var _reqHandlers = null;
/**
- * Set the requests handlers
- * @param {Object} reqHandlers the list of requests handlers
+ * Set the requests handlers object
+ * @param {Emily Store} reqHandlers an object containing the requests handlers
* @returns
*/
this.setReqHandlers = function setReqHandlers(reqHandlers) {
@@ -1207,26 +1304,25 @@ function Transport(Store) {
/**
* Get the requests handlers
- * @private
- * @returns
+ * @returns{ Emily Store} reqHandlers the object containing the requests handlers
*/
this.getReqHandlers = function getReqHandlers() {
return _reqHandlers;
};
/**
- * Make a request
- * @param {String} channel is the name of the request handler to use
- * @param data the request data
+ * Issue a request to a request handler
+ * @param {String} reqHandler the name of the request handler to issue the request to
+ * @param {Object} data the data, or payload, to send to the request handler
* @param {Function} callback the function to execute with the result
* @param {Object} scope the scope in which to execute the callback
* @returns
*/
- this.request = function request(channel, data, callback, scope) {
- if (_reqHandlers.has(channel)
+ this.request = function request(reqHandler, data, callback, scope) {
+ if (_reqHandlers.has(reqHandler)
&& typeof data != "undefined") {
- _reqHandlers.get(channel)(data, function () {
+ _reqHandlers.get(reqHandler)(data, function () {
callback && callback.apply(scope, arguments);
});
return true;
@@ -1236,15 +1332,16 @@ function Transport(Store) {
};
/**
- * Listen to a path (Kept alive)
- * @param {String} channel is the name of the request handler to use
- * @param data the request data: path should indicate the url, query can add up query strings to the url
+ * Issue a request to a reqHandler but keep listening for the response as it can be sent in several chunks
+ * or remain open as long as the abort funciton is not called
+ * @param {String} reqHandler the name of the request handler to issue the request to
+ * @param {Object} data the data, or payload, to send to the request handler
* @param {Function} callback the function to execute with the result
* @param {Object} scope the scope in which to execute the callback
- * @returns
+ * @returns {Function} the abort function to call to stop listening
*/
- this.listen = function listen(channel, data, callback, scope) {
- if (_reqHandlers.has(channel)
+ this.listen = function listen(reqHandler, data, callback, scope) {
+ if (_reqHandlers.has(reqHandler)
&& typeof data != "undefined"
&& typeof callback == "function") {
@@ -1253,9 +1350,13 @@ function Transport(Store) {
},
abort;
- abort = _reqHandlers.get(channel)(data, func, func);
+ abort = _reqHandlers.get(reqHandler)(data, func, func);
return function () {
- abort.func.call(abort.scope);
+ if (typeof abort == "function") {
+ abort();
+ } else if (typeof abort == "object" && typeof abort.func == "function") {
+ abort.func.call(abort.scope);
+ }
};
} else {
return false;
View
60 lib/require.js
@@ -1,35 +1,35 @@
/*
- RequireJS 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
-(function(Z){function w(b){return J.call(b)==="[object Function]"}function G(b){return J.call(b)==="[object Array]"}function q(b,d){if(b){var f;for(f=0;f<b.length;f+=1)if(b[f]&&d(b[f],f,b))break}}function N(b,d){if(b){var f;for(f=b.length-1;f>-1;f-=1)if(b[f]&&d(b[f],f,b))break}}function x(b,d){for(var f in b)if(b.hasOwnProperty(f)&&d(b[f],f))break}function K(b,d,f,g){d&&x(d,function(d,k){if(f||!b.hasOwnProperty(k))g&&typeof d!=="string"?(b[k]||(b[k]={}),K(b[k],d,f,g)):b[k]=d});return b}function s(b,
-d){return function(){return d.apply(b,arguments)}}function $(b){if(!b)return b;var d=Z;q(b.split("."),function(b){d=d[b]});return d}function aa(b,d,f){return function(){var g=ga.call(arguments,0),e;if(f&&w(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return b.apply(null,g)}}function ba(b,d,f){q([["toUrl"],["undef"],["defined","requireDefined"],["specified","requireSpecified"]],function(g){var e=g[1]||g[0];b[g[0]]=d?aa(d[e],f):function(){var b=t[O];return b[e].apply(b,arguments)}})}function H(b,
-d,f,g){d=Error(d+"\nhttp://requirejs.org/docs/errors.html#"+b);d.requireType=b;d.requireModules=g;if(f)d.originalError=f;return d}function ha(){if(I&&I.readyState==="interactive")return I;N(document.getElementsByTagName("script"),function(b){if(b.readyState==="interactive")return I=b});return I}var ia=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ja=/require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,ca=/\.js$/,ka=/^\.\//,J=Object.prototype.toString,y=Array.prototype,ga=y.slice,la=y.splice,u=!!(typeof window!==
-"undefined"&&navigator&&document),da=!u&&typeof importScripts!=="undefined",ma=u&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,O="_",S=typeof opera!=="undefined"&&opera.toString()==="[object Opera]",t={},p={},P=[],L=!1,k,v,C,z,D,I,E,ea,fa;if(typeof define==="undefined"){if(typeof requirejs!=="undefined"){if(w(requirejs))return;p=requirejs;requirejs=void 0}typeof require!=="undefined"&&!w(require)&&(p=require,require=void 0);k=requirejs=function(b,d,f,g){var e=O,r;!G(b)&&
-typeof b!=="string"&&(r=b,G(d)?(b=d,d=f,f=g):b=[]);if(r&&r.context)e=r.context;(g=t[e])||(g=t[e]=k.s.newContext(e));r&&g.configure(r);return g.require(b,d,f)};k.config=function(b){return k(b)};require||(require=k);k.version="2.0.2";k.jsExtRegExp=/^\/|:|\?|\.js$/;k.isBrowser=u;y=k.s={contexts:t,newContext:function(b){function d(a,c,l){var A=c&&c.split("/"),b=m.map,i=b&&b["*"],h,d,f,e;if(a&&a.charAt(0)===".")if(c){A=m.pkgs[c]?[c]:A.slice(0,A.length-1);c=a=A.concat(a.split("/"));for(h=0;c[h];h+=1)if(d=
-c[h],d===".")c.splice(h,1),h-=1;else if(d==="..")if(h===1&&(c[2]===".."||c[0]===".."))break;else h>0&&(c.splice(h-1,2),h-=2);h=m.pkgs[c=a[0]];a=a.join("/");h&&a===c+"/"+h.main&&(a=c)}else a.indexOf("./")===0&&(a=a.substring(2));if(l&&(A||i)&&b){c=a.split("/");for(h=c.length;h>0;h-=1){f=c.slice(0,h).join("/");if(A)for(d=A.length;d>0;d-=1)if(l=b[A.slice(0,d).join("/")])if(l=l[f]){e=l;break}!e&&i&&i[f]&&(e=i[f]);if(e){c.splice(0,h,e);a=c.join("/");break}}}return a}function f(a){u&&q(document.getElementsByTagName("script"),
-function(c){if(c.getAttribute("data-requiremodule")===a&&c.getAttribute("data-requirecontext")===j.contextName)return c.parentNode.removeChild(c),!0})}function g(a){var c=m.paths[a];if(c&&G(c)&&c.length>1)return f(a),c.shift(),j.undef(a),j.require([a]),!0}function e(a,c,l,b){var T=a?a.indexOf("!"):-1,i=null,h=c?c.name:null,f=a,e=!0,g="",k,m;a||(e=!1,a="_@r"+(N+=1));T!==-1&&(i=a.substring(0,T),a=a.substring(T+1,a.length));i&&(i=d(i,h,b),m=o[i]);a&&(i?g=m&&m.normalize?m.normalize(a,function(a){return d(a,
-h,b)}):d(a,h,b):(g=d(a,h,b),k=j.nameToUrl(a,null,c)));a=i&&!m&&!l?"_unnormalized"+(O+=1):"";return{prefix:i,name:g,parentMap:c,unnormalized:!!a,url:k,originalName:f,isDefine:e,id:(i?i+"!"+g:g)+a}}function r(a){var c=a.id,l=n[c];l||(l=n[c]=new j.Module(a));return l}function p(a,c,l){var b=a.id,d=n[b];if(o.hasOwnProperty(b)&&(!d||d.defineEmitComplete))c==="defined"&&l(o[b]);else r(a).on(c,l)}function B(a,c){var l=a.requireModules,b=!1;if(c)c(a);else if(q(l,function(c){if(c=n[c])c.error=a,c.events.error&&
-(b=!0,c.emit("error",a))}),!b)k.onError(a)}function v(){P.length&&(la.apply(F,[F.length-1,0].concat(P)),P=[])}function t(a,c,l){a=a&&a.map;c=aa(l||j.require,a,c);ba(c,j,a);c.isBrowser=u;return c}function y(a){delete n[a];q(M,function(c,l){if(c.map.id===a)return M.splice(l,1),c.defined||(j.waitCount-=1),!0})}function z(a,c){var l=a.map.id,b=a.depMaps,d;if(a.inited){if(c[l])return a;c[l]=!0;q(b,function(a){if(a=n[a.id])return!a.inited||!a.enabled?(d=null,delete c[l],!0):d=z(a,K({},c))});return d}}function C(a,
-c,b){var d=a.map.id,e=a.depMaps;if(a.inited&&a.map.isDefine){if(c[d])return o[d];c[d]=a;q(e,function(i){var i=i.id,h=n[i];!Q[i]&&h&&(!h.inited||!h.enabled?b[d]=!0:(h=C(h,c,b),b[i]||a.defineDepById(i,h)))});a.check(!0);return o[d]}}function D(a){a.check()}function E(){var a=m.waitSeconds*1E3,c=a&&j.startTime+a<(new Date).getTime(),b=[],d=!1,e=!0,i,h,k;if(!U){U=!0;x(n,function(a){i=a.map;h=i.id;if(a.enabled&&!a.error)if(!a.inited&&c)g(h)?d=k=!0:(b.push(h),f(h));else if(!a.inited&&a.fetched&&i.isDefine&&
-(d=!0,!i.prefix))return e=!1});if(c&&b.length)return a=H("timeout","Load timeout for modules: "+b,null,b),a.contextName=j.contextName,B(a);e&&(q(M,function(a){if(!a.defined){var a=z(a,{}),c={};a&&(C(a,c,{}),x(c,D))}}),x(n,D));if((!c||k)&&d)if((u||da)&&!V)V=setTimeout(function(){V=0;E()},50);U=!1}}function W(a){r(e(a[0],null,!0)).init(a[1],a[2])}function J(a){var a=a.currentTarget||a.srcElement,c=j.onScriptLoad;a.detachEvent&&!S?a.detachEvent("onreadystatechange",c):a.removeEventListener("load",c,
-!1);c=j.onScriptError;a.detachEvent&&!S||a.removeEventListener("error",c,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}var m={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{}},n={},X={},F=[],o={},R={},N=1,O=1,M=[],U,Y,j,Q,V;Q={require:function(a){return t(a)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports=o[a.map.id]={}},module:function(a){return a.module={id:a.map.id,uri:a.map.url,config:function(){return m.config&&m.config[a.map.id]||{}},exports:o[a.map.id]}}};
-Y=function(a){this.events=X[a.id]||{};this.map=a;this.shim=m.shim[a.id];this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Y.prototype={init:function(a,c,b,d){d=d||{};if(!this.inited){this.factory=c;if(b)this.on("error",b);else this.events.error&&(b=s(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.depMaps.rjsSkipMap=a.rjsSkipMap;this.errback=b;this.inited=!0;this.ignore=d.ignore;d.enabled||this.enabled?this.enable():this.check()}},defineDepById:function(a,
-c){var b;q(this.depMaps,function(c,d){if(c.id===a)return b=d,!0});return this.defineDep(b,c)},defineDep:function(a,c){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=c)},fetch:function(){if(!this.fetched){this.fetched=!0;j.startTime=(new Date).getTime();var a=this.map;if(this.shim)t(this,!0)(this.shim.deps||[],s(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;R[a]||
-(R[a]=!0,j.load(this.map.id,a))},check:function(a){if(this.enabled&&!this.enabling){var c=this.map.id,b=this.depExports,d=this.exports,e=this.factory,i;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(w(e)){if(this.events.error)try{d=j.execCb(c,e,b,d)}catch(h){i=h}else d=j.execCb(c,e,b,d);if(this.map.isDefine)if((b=this.module)&&b.exports!==void 0&&b.exports!==this.exports)d=b.exports;else if(d===void 0&&this.usingExports)d=
-this.exports;if(i)return i.requireMap=this.map,i.requireModules=[this.map.id],i.requireType="define",B(this.error=i)}else d=e;this.exports=d;if(this.map.isDefine&&!this.ignore&&(o[c]=d,k.onResourceLoad))k.onResourceLoad(j,this.map,this.depMaps);delete n[c];this.defined=!0;j.waitCount-=1;j.waitCount===0&&(M=[])}this.defining=!1;if(!a&&this.defined&&!this.defineEmitted)this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0}}else this.fetch()}},callPlugin:function(){var a=
-this.map,c=a.id,b=e(a.prefix,null,!1,!0);p(b,"defined",s(this,function(b){var l=this.map.name,i=this.map.parentMap?this.map.parentMap.name:null;if(this.map.unnormalized){if(b.normalize&&(l=b.normalize(l,function(a){return d(a,i,!0)})||""),b=e(a.prefix+"!"+l,this.map.parentMap,!1,!0),p(b,"defined",s(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),b=n[b.id]){if(this.events.error)b.on("error",s(this,function(a){this.emit("error",a)}));b.enable()}}else l=s(this,function(a){this.init([],
-function(){return a},null,{enabled:!0})}),l.error=s(this,function(a){this.inited=!0;this.error=a;a.requireModules=[c];x(n,function(a){a.map.id.indexOf(c+"_unnormalized")===0&&y(a.map.id)});B(a)}),l.fromText=function(a,c){var b=L;b&&(L=!1);r(e(a));k.exec(c);b&&(L=!0);j.completeLoad(a)},b.load(a.name,t(a.parentMap,!0,function(a,c){a.rjsSkipMap=!0;return j.require(a,c)}),l,m)}));j.enable(b,this);this.pluginMaps[b.id]=b},enable:function(){this.enabled=!0;if(!this.waitPushed)M.push(this),j.waitCount+=
-1,this.waitPushed=!0;this.enabling=!0;q(this.depMaps,s(this,function(a,c){var b,d;if(typeof a==="string"){a=e(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap);this.depMaps[c]=a;if(b=Q[a.id]){this.depExports[c]=b(this);return}this.depCount+=1;p(a,"defined",s(this,function(a){this.defineDep(c,a);this.check()}));this.errback&&p(a,"error",this.errback)}b=a.id;d=n[b];!Q[b]&&d&&!d.enabled&&j.enable(a,this)}));x(this.pluginMaps,s(this,function(a){var c=n[a.id];c&&!c.enabled&&
-j.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,c){var b=this.events[a];b||(b=this.events[a]=[]);b.push(c)},emit:function(a,c){q(this.events[a],function(a){a(c)});a==="error"&&delete this.events[a]}};return j={config:m,contextName:b,registry:n,defined:o,urlFetched:R,waitCount:0,defQueue:F,Module:Y,makeModuleMap:e,configure:function(a){a.baseUrl&&a.baseUrl.charAt(a.baseUrl.length-1)!=="/"&&(a.baseUrl+="/");var c=m.pkgs,b=m.shim,d=m.paths,f=m.map;K(m,a,!0);m.paths=K(d,a.paths,!0);if(a.map)m.map=
-K(f||{},a.map,!0,!0);if(a.shim)x(a.shim,function(a,c){G(a)&&(a={deps:a});if(a.exports&&!a.exports.__buildReady)a.exports=j.makeShimExports(a.exports);b[c]=a}),m.shim=b;if(a.packages)q(a.packages,function(a){a=typeof a==="string"?{name:a}:a;c[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ka,"").replace(ca,"")}}),m.pkgs=c;x(n,function(a,c){a.map=e(c)});if(a.deps||a.callback)j.require(a.deps||[],a.callback)},makeShimExports:function(a){var c;return typeof a==="string"?
-(c=function(){return $(a)},c.exports=a,c):function(){return a.apply(Z,arguments)}},requireDefined:function(a,c){var b=e(a,c,!1,!0).id;return o.hasOwnProperty(b)},requireSpecified:function(a,c){a=e(a,c,!1,!0).id;return o.hasOwnProperty(a)||n.hasOwnProperty(a)},require:function(a,c,d,f){var g;if(typeof a==="string"){if(w(c))return B(H("requireargs","Invalid require call"),d);if(k.get)return k.get(j,a,c);a=e(a,c,!1,!0);a=a.id;return!o.hasOwnProperty(a)?B(H("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+
-b)):o[a]}d&&!w(d)&&(f=d,d=void 0);c&&!w(c)&&(f=c,c=void 0);for(v();F.length;)if(g=F.shift(),g[0]===null)return B(H("mismatch","Mismatched anonymous define() module: "+g[g.length-1]));else W(g);r(e(null,f)).init(a,c,d,{enabled:!0});E();return j.require},undef:function(a){var c=e(a,null,!0),b=n[a];delete o[a];delete R[c.url];delete X[a];if(b){if(b.events.defined)X[a]=b.events;y(a)}},enable:function(a){n[a.id]&&r(a).enable()},completeLoad:function(a){var c=m.shim[a]||{},b=c.exports&&c.exports.exports,
-d,e;for(v();F.length;){e=F.shift();if(e[0]===null){e[0]=a;if(d)break;d=!0}else e[0]===a&&(d=!0);W(e)}e=n[a];if(!d&&!o[a]&&e&&!e.inited)if(m.enforceDefine&&(!b||!$(b)))if(g(a))return;else return B(H("nodefine","No define call for "+a,null,[a]));else W([a,c.deps||[],c.exports]);E()},toUrl:function(a,b){var d=a.lastIndexOf("."),e=null;d!==-1&&(e=a.substring(d,a.length),a=a.substring(0,d));return j.nameToUrl(a,e,b)},nameToUrl:function(a,b,e){var f,g,i,h,j,a=d(a,e&&e.id,!0);if(k.jsExtRegExp.test(a))b=
-a+(b||"");else{f=m.paths;g=m.pkgs;e=a.split("/");for(h=e.length;h>0;h-=1)if(j=e.slice(0,h).join("/"),i=g[j],j=f[j]){G(j)&&(j=j[0]);e.splice(0,h,j);break}else if(i){a=a===i.name?i.location+"/"+i.main:i.location;e.splice(0,h,a);break}b=e.join("/")+(b||".js");b=(b.charAt(0)==="/"||b.match(/^[\w\+\.\-]+:/)?"":m.baseUrl)+b}return m.urlArgs?b+((b.indexOf("?")===-1?"?":"&")+m.urlArgs):b},load:function(a,b){k.load(j,a,b)},execCb:function(a,b,d,e){return b.apply(e,d)},onScriptLoad:function(a){if(a.type===
-"load"||ma.test((a.currentTarget||a.srcElement).readyState))I=null,a=J(a),j.completeLoad(a.id)},onScriptError:function(a){var b=J(a);if(!g(b.id))return B(H("scripterror","Script error",a,[b.id]))}}}};k({});ba(k);if(u&&(v=y.head=document.getElementsByTagName("head")[0],C=document.getElementsByTagName("base")[0]))v=y.head=C.parentNode;k.onError=function(b){throw b;};k.load=function(b,d,f){var g=b&&b.config||{},e;if(u)return e=g.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):
-document.createElement("script"),e.type=g.scriptType||"text/javascript",e.charset="utf-8",e.setAttribute("data-requirecontext",b.contextName),e.setAttribute("data-requiremodule",d),e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!S?(L=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=f,E=e,C?v.insertBefore(e,C):v.appendChild(e),E=null,e;else da&&(importScripts(f),
-b.completeLoad(d))};u&&N(document.getElementsByTagName("script"),function(b){if(!v)v=b.parentNode;if(z=b.getAttribute("data-main")){D=z.split("/");ea=D.pop();fa=D.length?D.join("/")+"/":"./";if(!p.baseUrl)p.baseUrl=fa;z=ea.replace(ca,"");p.deps=p.deps?p.deps.concat(z):[z];return!0}});define=function(b,d,f){var g,e;typeof b!=="string"&&(f=d,d=b,b=null);G(d)||(f=d,d=[]);!d.length&&w(f)&&f.length&&(f.toString().replace(ia,"").replace(ja,function(b,e){d.push(e)}),d=(f.length===1?["require"]:["require",
-"exports","module"]).concat(d));if(L&&(g=E||ha()))b||(b=g.getAttribute("data-requiremodule")),e=t[g.getAttribute("data-requirecontext")];(e?e.defQueue:P).push([b,d,f])};define.amd={jQuery:!0};k.exec=function(b){return eval(b)};k(p)}})(this);
+(function(aa){function I(b){return"[object Function]"===L.call(b)}function J(b){return"[object Array]"===L.call(b)}function y(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function M(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function s(b,c){return ga.call(b,c)}function m(b,c){return s(b,c)&&b[c]}function G(b,c){for(var d in b)if(s(b,d)&&c(b[d],d))break}function R(b,c,d,m){c&&G(c,function(c,j){if(d||!s(b,j))m&&"string"!==typeof c?(b[j]||(b[j]={}),R(b[j],
+c,d,m)):b[j]=c});return b}function u(b,c){return function(){return c.apply(b,arguments)}}function ba(b){if(!b)return b;var c=aa;y(b.split("."),function(b){c=c[b]});return c}function B(b,c,d,m){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=m;d&&(c.originalError=d);return c}function ha(b){function c(a,f,b){var e,n,c,g,d,S,i,h=f&&f.split("/");e=h;var j=k.map,l=j&&j["*"];if(a&&"."===a.charAt(0))if(f){e=m(k.pkgs,f)?h=[f]:h.slice(0,h.length-1);f=a=e.concat(a.split("/"));
+for(e=0;f[e];e+=1)if(n=f[e],"."===n)f.splice(e,1),e-=1;else if(".."===n)if(1===e&&(".."===f[2]||".."===f[0]))break;else 0<e&&(f.splice(e-1,2),e-=2);e=m(k.pkgs,f=a[0]);a=a.join("/");e&&a===f+"/"+e.main&&(a=f)}else 0===a.indexOf("./")&&(a=a.substring(2));if(b&&j&&(h||l)){f=a.split("/");for(e=f.length;0<e;e-=1){c=f.slice(0,e).join("/");if(h)for(n=h.length;0<n;n-=1)if(b=m(j,h.slice(0,n).join("/")))if(b=m(b,c)){g=b;d=e;break}if(g)break;!S&&(l&&m(l,c))&&(S=m(l,c),i=e)}!g&&S&&(g=S,d=i);g&&(f.splice(0,d,
+g),a=f.join("/"))}return a}function d(a){A&&y(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===a&&f.getAttribute("data-requirecontext")===i.contextName)return f.parentNode.removeChild(f),!0})}function z(a){var f=m(k.paths,a);if(f&&J(f)&&1<f.length)return d(a),f.shift(),i.require.undef(a),i.require([a]),!0}function h(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function j(a,f,b,e){var n,C,g=null,d=f?f.name:
+null,j=a,l=!0,k="";a||(l=!1,a="_@r"+(M+=1));a=h(a);g=a[0];a=a[1];g&&(g=c(g,d,e),C=m(q,g));a&&(g?k=C&&C.normalize?C.normalize(a,function(a){return c(a,d,e)}):c(a,d,e):(k=c(a,d,e),a=h(k),g=a[0],k=a[1],b=!0,n=i.nameToUrl(k)));b=g&&!C&&!b?"_unnormalized"+(Q+=1):"";return{prefix:g,name:k,parentMap:f,unnormalized:!!b,url:n,originalName:j,isDefine:l,id:(g?g+"!"+k:k)+b}}function r(a){var f=a.id,b=m(p,f);b||(b=p[f]=new i.Module(a));return b}function t(a,f,b){var e=a.id,n=m(p,e);if(s(q,e)&&(!n||n.defineEmitComplete))"defined"===
+f&&b(q[e]);else r(a).on(f,b)}function v(a,f){var b=a.requireModules,e=!1;if(f)f(a);else if(y(b,function(f){if(f=m(p,f))f.error=a,f.events.error&&(e=!0,f.emit("error",a))}),!e)l.onError(a)}function w(){T.length&&(ia.apply(H,[H.length-1,0].concat(T)),T=[])}function x(a){delete p[a];delete V[a]}function F(a,f,b){var e=a.map.id;a.error?a.emit("error",a.error):(f[e]=!0,y(a.depMaps,function(e,c){var g=e.id,d=m(p,g);d&&(!a.depMatched[c]&&!b[g])&&(m(f,g)?(a.defineDep(c,q[g]),a.check()):F(d,f,b))}),b[e]=!0)}
+function D(){var a,f,b,e,n=(b=1E3*k.waitSeconds)&&i.startTime+b<(new Date).getTime(),c=[],g=[],h=!1,j=!0;if(!W){W=!0;G(V,function(b){a=b.map;f=a.id;if(b.enabled&&(a.isDefine||g.push(b),!b.error))if(!b.inited&&n)z(f)?h=e=!0:(c.push(f),d(f));else if(!b.inited&&(b.fetched&&a.isDefine)&&(h=!0,!a.prefix))return j=!1});if(n&&c.length)return b=B("timeout","Load timeout for modules: "+c,null,c),b.contextName=i.contextName,v(b);j&&y(g,function(a){F(a,{},{})});if((!n||e)&&h)if((A||da)&&!X)X=setTimeout(function(){X=
+0;D()},50);W=!1}}function E(a){s(q,a[0])||r(j(a[0],null,!0)).init(a[1],a[2])}function K(a){var a=a.currentTarget||a.srcElement,b=i.onScriptLoad;a.detachEvent&&!Y?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=i.onScriptError;(!a.detachEvent||Y)&&a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function L(){var a;for(w();H.length;){a=H.shift();if(null===a[0])return v(B("mismatch","Mismatched anonymous define() module: "+a[a.length-
+1]));E(a)}}var W,Z,i,N,X,k={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{},config:{}},p={},V={},$={},H=[],q={},U={},M=1,Q=1;N={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=q[a.map.id]={}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return k.config&&m(k.config,a.map.id)||{}},exports:q[a.map.id]}}};Z=function(a){this.events=
+m($,a.id)||{};this.map=a;this.shim=m(k.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};Z.prototype={init:function(a,b,c,e){e=e||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=u(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=e.ignore;e.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=
+!0,this.depCount-=1,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a=this.map.url;U[a]||(U[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;
+var e=this.exports,n=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(I(n)){if(this.events.error)try{e=i.execCb(c,n,b,e)}catch(d){a=d}else e=i.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",v(this.error=
+a)}else e=n;this.exports=e;if(this.map.isDefine&&!this.ignore&&(q[c]=e,l.onResourceLoad))l.onResourceLoad(i,this.map,this.depMaps);x(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=j(a.prefix);this.depMaps.push(d);t(d,"defined",u(this,function(e){var n,d;d=this.map.name;var g=this.map.parentMap?this.map.parentMap.name:null,h=
+i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,g,!0)})||""),e=j(a.prefix+"!"+d,this.map.parentMap),t(e,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(p,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else n=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=u(this,
+function(a){this.inited=!0;this.error=a;a.requireModules=[b];G(p,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&x(a.map.id)});v(a)}),n.fromText=u(this,function(e,c){var d=a.name,g=j(d),C=O;c&&(e=c);C&&(O=!1);r(g);s(k.config,b)&&(k.config[d]=k.config[b]);try{l.exec(e)}catch(ca){return v(B("fromtexteval","fromText eval for "+b+" failed: "+ca,ca,[b]))}C&&(O=!0);this.depMaps.push(g);i.completeLoad(d);h([d],n)}),e.load(a.name,h,n,k)}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=
+this;this.enabling=this.enabled=!0;y(this.depMaps,u(this,function(a,b){var c,e;if("string"===typeof a){a=j(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;t(a,"defined",u(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&t(a,"error",this.errback)}c=a.id;e=p[c];!s(N,c)&&(e&&!e.enabled)&&i.enable(a,this)}));G(this.pluginMaps,u(this,function(a){var b=m(p,a.id);b&&!b.enabled&&i.enable(a,
+this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:k,contextName:b,registry:p,defined:q,urlFetched:U,defQueue:H,Module:Z,makeModuleMap:j,nextTick:l.nextTick,onError:v,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=k.pkgs,c=k.shim,e={paths:!0,config:!0,map:!0};G(a,function(a,b){e[b]?
+"map"===b?(k.map||(k.map={}),R(k[b],a,!0,!0)):R(k[b],a,!0):k[b]=a});a.shim&&(G(a.shim,function(a,b){J(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);c[b]=a}),k.shim=c);a.packages&&(y(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ja,"").replace(ea,"")}}),k.pkgs=b);G(p,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=j(b))});if(a.deps||a.callback)i.require(a.deps||[],
+a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(aa,arguments));return b||a.exports&&ba(a.exports)}},makeRequire:function(a,f){function d(e,c,h){var g,k;f.enableBuildCallback&&(c&&I(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(I(c))return v(B("requireargs","Invalid require call"),h);if(a&&s(N,e))return N[e](p[a.id]);if(l.get)return l.get(i,e,a,d);g=j(e,a,!1,!0);g=g.id;return!s(q,g)?v(B("notloaded",'Module name "'+g+'" has not been loaded yet for context: '+
+b+(a?"":". Use require([])"))):q[g]}L();i.nextTick(function(){L();k=r(j(null,a));k.skipMap=f.skipMap;k.init(e,c,h,{enabled:!0});D()});return d}f=f||{};R(d,{isBrowser:A,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==f&&(!("."===g||".."===g)||1<f))d=b.substring(f,b.length),b=b.substring(0,f);return i.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return s(q,j(b,a,!1,!0).id)},specified:function(b){b=j(b,a,!1,!0).id;return s(q,b)||s(p,b)}});a||(d.undef=function(b){w();var c=
+j(b,a,!0),d=m(p,b);delete q[b];delete U[c.url];delete $[b];d&&(d.events.defined&&($[b]=d.events),x(b))});return d},enable:function(a){m(p,a.id)&&r(a).enable()},completeLoad:function(a){var b,c,e=m(k.shim,a)||{},d=e.exports;for(w();H.length;){c=H.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=m(p,a);if(!b&&!s(q,a)&&c&&!c.inited){if(k.enforceDefine&&(!d||!ba(d)))return z(a)?void 0:v(B("nodefine","No define call for "+a,null,[a]));E([a,e.deps||[],e.exportsFn])}D()},nameToUrl:function(a,
+b,c){var e,d,h,g,j,i;if(l.jsExtRegExp.test(a))g=a+(b||"");else{e=k.paths;d=k.pkgs;g=a.split("/");for(j=g.length;0<j;j-=1)if(i=g.slice(0,j).join("/"),h=m(d,i),i=m(e,i)){J(i)&&(i=i[0]);g.splice(0,j,i);break}else if(h){a=a===h.name?h.location+"/"+h.main:h.location;g.splice(0,j,a);break}g=g.join("/");g+=b||(/\?/.test(g)||c?"":".js");g=("/"===g.charAt(0)||g.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+g}return k.urlArgs?g+((-1===g.indexOf("?")?"?":"&")+k.urlArgs):g},load:function(a,b){l.load(i,a,b)},execCb:function(a,
+b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ka.test((a.currentTarget||a.srcElement).readyState))P=null,a=K(a),i.completeLoad(a.id)},onScriptError:function(a){var b=K(a);if(!z(b.id))return v(B("scripterror","Script error",a,[b.id]))}};i.require=i.makeRequire();return i}var l,w,x,D,t,E,P,K,Q,fa,la=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ma=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,ea=/\.js$/,ja=/^\.\//;w=Object.prototype;var L=w.toString,ga=w.hasOwnProperty,ia=
+Array.prototype.splice,A=!!("undefined"!==typeof window&&navigator&&document),da=!A&&"undefined"!==typeof importScripts,ka=A&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},r={},T=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(I(requirejs))return;r=requirejs;requirejs=void 0}"undefined"!==typeof require&&!I(require)&&(r=require,require=void 0);l=requirejs=function(b,c,d,z){var h,
+j="_";!J(b)&&"string"!==typeof b&&(h=b,J(c)?(b=c,c=d,d=z):b=[]);h&&h.context&&(j=h.context);(z=m(F,j))||(z=F[j]=l.s.newContext(j));h&&z.configure(h);return z.require(b,c,d)};l.config=function(b){return l(b)};l.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=l);l.version="2.1.5";l.jsExtRegExp=/^\/|:|\?|\.js$/;l.isBrowser=A;w=l.s={contexts:F,newContext:ha};l({});y(["toUrl","undef","defined","specified"],function(b){l[b]=function(){var c=F._;return c.require[b].apply(c,
+arguments)}});if(A&&(x=w.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))x=w.head=D.parentNode;l.onError=function(b){throw b;};l.load=function(b,c,d){var l=b&&b.config||{},h;if(A)return h=l.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),h.type=l.scriptType||"text/javascript",h.charset="utf-8",h.async=!0,h.setAttribute("data-requirecontext",b.contextName),h.setAttribute("data-requiremodule",c),
+h.attachEvent&&!(h.attachEvent.toString&&0>h.attachEvent.toString().indexOf("[native code"))&&!Y?(O=!0,h.attachEvent("onreadystatechange",b.onScriptLoad)):(h.addEventListener("load",b.onScriptLoad,!1),h.addEventListener("error",b.onScriptError,!1)),h.src=d,K=h,D?x.insertBefore(h,D):x.appendChild(h),K=null,h;if(da)try{importScripts(d),b.completeLoad(c)}catch(j){b.onError(B("importscripts","importScripts failed for "+c+" at "+d,j,[c]))}};A&&M(document.getElementsByTagName("script"),function(b){x||(x=
+b.parentNode);if(t=b.getAttribute("data-main"))return r.baseUrl||(E=t.split("/"),Q=E.pop(),fa=E.length?E.join("/")+"/":"./",r.baseUrl=fa,t=Q),t=t.replace(ea,""),r.deps=r.deps?r.deps.concat(t):[t],!0});define=function(b,c,d){var l,h;"string"!==typeof b&&(d=c,c=b,b=null);J(c)||(d=c,c=[]);!c.length&&I(d)&&d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(l=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),
+function(b){if("interactive"===b.readyState)return P=b}),l=P;l&&(b||(b=l.getAttribute("data-requiremodule")),h=F[l.getAttribute("data-requirecontext")])}(h?h.defQueue:T).push([b,c,d])};define.amd={jQuery:!0};l.exec=function(b){return eval(b)};l(r)}})(this);
View
18 node_modules/emily/LICENSE
@@ -2,20 +2,20 @@
* @license Emily http://flams.github.com/emily
*
* The MIT License (MIT)
- *
- * Copyright (c) 2012 Olivier Scherrer <pode.fr@gmail.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+ *
+ * Copyright (c) 2012-2013 Olivier Scherrer <pode.fr@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all copies or substantial
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
- */
+ */
View
1,108 node_modules/emily/README.md
@@ -0,0 +1,1108 @@
+###What is Emily?
+
+ * Emily is a JS library for building scalable web applications.
+ * It's runtime agnostic as it doesn't rely on the DOM.
+ * It's ready for realtime applications.
+ * It's only a set of AMD/commonJS modules, your module loader is the framework
+ * It's ready for being used with other frameworks.
+ * It only relies on standard features
+ * It eases the development of MV* applications by providing the M
+
+###What modules does it provide?
+
+ * Observable: the all mighty observer design pattern.
+ * Store: the spine of your MV* application.
+ * Promise: a fully compliant promise/A+ implementation following https://github.com/promises-aplus/promises-tests
+ * StateMachine: don't hide your states and transitions behind if/else anymore.
+ * Transport: make requests to anything node.js has access to.
+ * Tools: these functions you always need and rewrite.
+
+###How do I use it?
+
+####In the browser:
+
+Emily requires an AMD/commonJS compatible loader. I use requirejs: http://requirejs.org/
+Download the latest version of Emily here: http://flams.github.com/emily/
+
+```html
+ <script src=