From 4960970b1f9d434740316b46c2379ec9a2044e9e Mon Sep 17 00:00:00 2001 From: Kabir Shah Date: Tue, 17 Jul 2018 20:29:34 -0700 Subject: [PATCH] export parser and generator --- packages/moon/dist/moon.js | 2 ++ packages/moon/dist/moon.min.js | 2 +- packages/moon/src/index.js | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/moon/dist/moon.js b/packages/moon/dist/moon.js index 4d4f0806..af5250aa 100644 --- a/packages/moon/dist/moon.js +++ b/packages/moon/dist/moon.js @@ -845,6 +845,8 @@ components[name] = component(name, options); }; + Moon.parse = parse; + Moon.generate = generate; Moon.compile = compile; Moon.config = config; diff --git a/packages/moon/dist/moon.min.js b/packages/moon/dist/moon.min.js index fa827ded..ccda7e3a 100644 --- a/packages/moon/dist/moon.min.js +++ b/packages/moon/dist/moon.min.js @@ -4,4 +4,4 @@ * Released under the MIT License * https://kbrsh.github.io/moon */ -!function(e,t){"undefined"==typeof module?e.Moon=t():module.exports=t()}(this,function(){"use strict";var t=/"[^"]*"|'[^']*'|\d+[a-zA-Z$_]\w*|\.[a-zA-Z$_]\w*|[a-zA-Z$_]\w*:|([a-zA-Z$_]\w*)/g,r=["NaN","false","in","null","this","true","typeof","undefined"],f=function(e){var n=!1;return{expression:e=e.replace(t,function(e,t){return void 0===t||-1!==r.indexOf(t)?e:(n=!0,"$"===t[0]?"locals."+t:"instance."+t)}),dynamic:n}},e={silent:!0},v=/^\s+$/,oe=function(e){return e[0]===e[0].toUpperCase()&&e[0]!==e[0].toLowerCase()},d=/[\s/>]/,l=function(e,t,n,r){for(;e"===i)break;if(v.test(i))e+=1;else{for(var o="",a=void 0,u=!1;e"===i||v.test(i)){a="";break}if("="===i){e+=1;break}o+=i,e+=1}if(void 0===a){var s=void 0;for(a="",'"'===(i=t[e])||"'"===i?(s=i,e+=1):"{"===i?(s="}",u=!0,e+=1):s=d;e"===o){var a=i.attributes,u=r.length-1;"/"===o?e+=1:r.push(i);for(var s=0;s"===i){e+=1;break}i}var o=r.pop();return o.type,e},s=function(e,t,n){for(;e"===o){e+=3;break}e+=1}}return e},c=/(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g,m={"&":"&",">":">","<":"<"," ":" ",""":'\\"',"\\":"\\\\",'"':'\\"',"\n":"\\n"},p=function(e,t,n,r){for(var i="";e]/,l=function(e,t,n,r){for(;e"===i)break;if(v.test(i))e+=1;else{for(var o="",a=void 0,u=!1;e"===i||v.test(i)){a="";break}if("="===i){e+=1;break}o+=i,e+=1}if(void 0===a){var s=void 0;for(a="",'"'===(i=t[e])||"'"===i?(s=i,e+=1):"{"===i?(s="}",u=!0,e+=1):s=d;e"===o){var a=i.attributes,u=r.length-1;"/"===o?e+=1:r.push(i);for(var s=0;s"===i){e+=1;break}i}var o=r.pop();return o.type,e},s=function(e,t,n){for(;e"===o){e+=3;break}e+=1}}return e},c=/(?:(?:&(?:amp|gt|lt|nbsp|quot);)|"|\\|\n)/g,m={"&":"&",">":">","<":"<"," ":" ",""":'\\"',"\\":"\\\\",'"':'\\"',"\n":"\\n"},p=function(e,t,n,r){for(var i="";e { components[name] = component(name, options); }; +Moon.parse = parse; +Moon.generate = generate; Moon.compile = compile; Moon.config = config;