diff --git a/dist/moon.js b/dist/moon.js index a4886106..9a75a361 100644 --- a/dist/moon.js +++ b/dist/moon.js @@ -1,11 +1,9 @@ -/* -* Moon v0.8.0 -* Copyright 2016-2017, Kabir Shah -* https://github.com/KingPixil/moon/ -* Free to use under the MIT license. -* https://kingpixil.github.io/license -*/ - +/** + * Moon v0.8.0 + * Copyright 2016-2017 Kabir Shah + * Released under the MIT License + * http://moonjs.ga + */ (function(root, factory) { /* ======= Global Moon ======= */ (typeof module === "object" && module.exports) ? module.exports = factory() : root.Moon = factory(); diff --git a/dist/moon.min.js b/dist/moon.min.js index bd0a6243..179e704c 100644 --- a/dist/moon.min.js +++ b/dist/moon.min.js @@ -1,8 +1,6 @@ -/* -* Moon v0.8.0 -* Copyright 2016-2017, Kabir Shah -* https://github.com/KingPixil/moon/ -* Free to use under the MIT license. -* https://kingpixil.github.io/license -*/ -!function(e,t){"object"==typeof module&&module.exports?module.exports=t():e.Moon=t()}(this,function(){"use strict";function e(e){this.instance=e,this.cache={},this.signals={},this.dep={target:null,map:{}}}function t(t){this.$opts=t||{},this.$id=s++,this.$name=this.$opts.name||"root",this.$data=this.$opts.data||{},this.$render=this.$opts.render||$,this.$hooks=this.$opts.hooks||{},this.$methods=this.$opts.methods||{},this.$events={},this.$dom={},this.$observer=new e(this),this.$destroyed=!1,this.$initialRender=!0,this.$queued=!1,this.$opts.computed&&a(this,this.$opts.computed),this.init()}var r={},n={},i={},o={stop:"event.stopPropagation();",prevent:"event.preventDefault();",ctrl:"if(!event.ctrlKey) {return;};",shift:"if(!event.shiftKey) {return;};",alt:"if(!event.altKey) {return;};",enter:"if(event.keyCode !== 13) {return;};"},s=0,a=function(e,t){for(var r in t)!function(r){e.$observer.observe(r);var n={get:function(){var n=null;return e.$observer.cache[r]?n=e.$observer.cache[r]:(e.$observer.dep.target=r,n=t[r].get.call(e),e.$observer.dep.target=null,e.$observer.cache[r]=n),n}};t[r].set&&(n.set=function(n){return t[r].set.call(e,n)}),Object.defineProperty(e.$data,r,n)}(r)};e.prototype.observe=function(e){var t=this;this.signals[e]=function(){t.cache[e]=null}},e.prototype.notify=function(e){if(this.dep.map[e])for(var t=0;ta?s:a,c=0;c",e.current);if(n===-1)return e.tokens.push({type:"comment",value:t.slice(e.current)}),void(e.current=r);e.tokens.push({type:"comment",value:t.slice(e.current,n)}),e.current=n+3},V=function(e){var t=e.input,r=(t.length,"/"===t.charAt(e.current+1));e.current+=r?2:1;var n=H(e);q(n,e);var i="/"===t.charAt(e.current);e.current+=i?2:1,(r||i)&&(n.close=!0)},H=function(e){for(var t=e.input,r=t.length,n=e.current,i="";n"===o||" "===o)break;i+=o,n++}var s={type:"tag",value:i};return e.tokens.push(s),e.current=n,s},q=function(e,t){for(var r=t.input,n=r.length,i=t.current,o=r.charAt(i),s=r.charAt(i+1),a=function(){i++,o=r.charAt(i),s=r.charAt(i+1)},u={};i"!==o&&("/"!==o||">"!==s);)if(" "!==o){for(var p="",c=!1;i"===o||"/"===o||">"===s){c=!0;break}p+=o,a()}var l={name:p,value:"",meta:{}};if(c)u[p]=l;else{a();var f=" ";for("'"!==o&&'"'!==o||(f=o,a());i1&&(a=u.shift(),s=u.join("(").slice(0,-1));var p="";n.shift();for(var c=0;ca?s:a,c=0;c",e.current);if(n===-1)return e.tokens.push({type:"comment",value:t.slice(e.current)}),void(e.current=r);e.tokens.push({type:"comment",value:t.slice(e.current,n)}),e.current=n+3},V=function(e){var t=e.input,r=(t.length,"/"===t.charAt(e.current+1));e.current+=r?2:1;var n=H(e);q(n,e);var i="/"===t.charAt(e.current);e.current+=i?2:1,(r||i)&&(n.close=!0)},H=function(e){for(var t=e.input,r=t.length,n=e.current,i="";n"===o||" "===o)break;i+=o,n++}var s={type:"tag",value:i};return e.tokens.push(s),e.current=n,s},q=function(e,t){for(var r=t.input,n=r.length,i=t.current,o=r.charAt(i),s=r.charAt(i+1),a=function(){i++,o=r.charAt(i),s=r.charAt(i+1)},u={};i"!==o&&("/"!==o||">"!==s);)if(" "!==o){for(var p="",c=!1;i"===o||"/"===o||">"===s){c=!0;break}p+=o,a()}var l={name:p,value:"",meta:{}};if(c)u[p]=l;else{a();var f=" ";for("'"!==o&&'"'!==o||(f=o,a());i1&&(a=u.shift(),s=u.join("(").slice(0,-1));var p="";n.shift();for(var c=0;c