cherry-cljs
Advanced tools
Comparing version 0.0.0-alpha.34 to 0.0.0-alpha.35
import { $APP, shadow$provide, $jscomp } from "./transpiler.js"; | ||
const shadow_esm_import = function(x) { return import(x) }; | ||
'use strict';var xF=function(a,b){return $APP.t($APP.t(b)?$APP.Ik.h(b,""):b)?$APP.wq(a,new $APP.Vo(new $APP.Uo(b,$APP.G(b)))):null},zF=function(a){throw $APP.Fm.h(["Unexpected format: ",$APP.v.g(a)].join(""),new $APP.q(null,1,[yF,a],null));},AF=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:zF(a)},BF=function(a){var b=JSON.parse(a);return $APP.Nd(b)?b:zF(a)},CF=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:zF(a)},DF=function(a){var b=JSON.parse(a);return"number"===typeof b?b:zF(a)},EF= | ||
function(a){return $APP.H.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Yh.h(a,1)):$APP.ii.g(a)},FF=function(a){return $APP.yd(a)?$APP.D(a):a},GF=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.H.h("true",a)||$APP.H.h("false",a))var c=AF(a);else{if($APP.Ca(isNaN(a)))var d=DF(a);else{var e=$APP.H.h(":",b);var f=e?$APP.Wh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?EF(a):a}c=d}return c}catch(g){return a}else return a},LF=function(a,b){var c=function(){switch(b instanceof $APP.Q? | ||
b.Na:null){case "boolean":return AF;case "int":case "long":return BF;case "double":return CF;case "number":return DF;case "symbol":return $APP.ti;case "keyword":return EF;case "string":return $APP.be;case "edn":return HF;case "auto":return GF;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=IF}if($APP.H.h(IF,d))throw $APP.Fm.h(["Coerce failure: cannot transform input ",$APP.bm.l($APP.V.h([a],0)),b instanceof $APP.Q?" to ":" with ",$APP.v.g(b instanceof $APP.Q? | ||
$APP.Ih(b):b)].join(""),new $APP.q(null,2,[JF,a,KF,b],null));return d}return a},MF=function(a,b,c){a=$APP.K.h(a,b);c=$APP.t(a)?a:$APP.yd(c)?$APP.od(c):null;return $APP.t(c)?$APP.yd(c)?$APP.Nk.h($APP.me,c):c:null},NF=function(a,b,c,d){return $APP.Ik.h(b,c)?$APP.hl.j(a,b,function(e){return null==e?$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},OF=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.yd(d):d)?LF(e,d):GF(e);return $APP.t(c)?$APP.hl.F(a,b,c,d):$APP.X.j(a, | ||
b,d)},TF=function(a){return $APP.M.j(function(b,c){var d=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);c=$APP.Oe(c);var e=$APP.K.h(c,PF),f=$APP.K.h(c,QF);c=$APP.K.h(c,$APP.vn);b=$APP.t(e)?$APP.hl.J(b,PF,$APP.X,d,e):b;b=$APP.t(f)?$APP.hl.j(b,RF,function(g){if($APP.Qd(g,f))throw $APP.Fm.h(["Conflicting alias ",$APP.v.g(f)," between ",$APP.v.g($APP.K.h(g,f))," and ",$APP.v.g(d)].join(""),new $APP.q(null,1,[QF,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.hl.J(b,SF,$APP.X,d,c):b},$APP.Ne,a)},fG= | ||
function(){var a=process.argv.slice(2),b=new $APP.q(null,1,[RF,new $APP.q(null,1,[UF,VF],null)],null),c=WF.g(b);b=$APP.t(c)?$APP.Fl.l($APP.V.h([b,$APP.t(c)?TF(c):null],0)):b;var d=PF.g(b),e=RF.g(b),f=XF.g(b),g=SF.g(b),h=YF.g(b),l=$APP.H.h(!0,ZF.g(b))?function(){var A=null==c?null:$APP.xh(c);A=null==A?null:$APP.Y.h(A,$APP.xh(e));A=null==A?null:$APP.Y.h(A,$APP.xh(d));return null==A?null:$APP.Gh(A)}():ZF.g(b);a=$APP.Th(function(A){var B=$APP.t(h)?null:0==A.lastIndexOf(":",0);return!($APP.t(B)?B:0==A.lastIndexOf("-", | ||
0))},a);var m=$APP.I.j(a,0,null),p=$APP.I.j(a,1,null);a=function(){var A=$APP.C(m);return null==A?null:$APP.Yf(A)}();var r=function(){for(var A=$APP.t(g)?g:$APP.Ne,B=null,F=null,O=$APP.t(h)?$F:null,S=$APP.C(p);;){if($APP.Ca(S))return new $APP.T(null,3,5,$APP.U,[A,B,F],null);var W=$APP.D(S),ka=MF(f,B,$APP.K.h(d,B)),va=0<W.length?W.charAt(0):null,xb=$APP.H.h(va,"-"),Qb=function(){var hd=O;return $APP.t(hd)?hd:xb?$F:null}(),na=$APP.H.h(":",va),Xb=$APP.Ik.h($F,Qb)&&na&&($APP.Ca(B)||$APP.H.h(F,B));va= | ||
function(){var hd=Qb;return $APP.t(hd)?hd:Xb?aG:null}();if(xb||Xb){var Ta=(na=0==W.lastIndexOf("--",0))&&$APP.H.h("--",W);if(Ta){var zd=$APP.E(S);return new $APP.T(null,3,5,$APP.U,[function(){var hd=A;return zd?$APP.Hk.F(hd,$APP.fl,new $APP.T(null,2,5,$APP.U,[bG,cG],null),$APP.Yf(zd)):hd}(),B,F],null)}Ta=na?$APP.Yh.h(W,2):$APP.zo(W,/^(:|-|)/,"");na=na?$APP.Do(Ta,/=/):new $APP.T(null,1,5,$APP.U,[Ta],null);Ta=$APP.I.j(na,0,null);na=$APP.I.j(na,1,null);Ta=$APP.ii.g(Ta);Ta=$APP.K.j(e,Ta,Ta);if($APP.t($APP.t(l)? | ||
$APP.Ca($APP.K.h(l,Ta)):l))throw $APP.Fm.h(["Unknown option ",$APP.v.g(W)].join(""),new $APP.q(null,1,[ZF,l],null));$APP.t(na)?(B=NF(A,B,F,ka),F=Ta,S=$APP.P(na,$APP.Kc(S)),A=B,B=F,F=null,O=va):(B=NF(A,B,F,ka),W=Ta,S=$APP.E(S),A=B,B=W,O=va)}else{var Hc=$APP.K.h(d,B);if(Ta=$APP.H.h(dG,Hc)&&$APP.Ca(F)&&$APP.Ik.h(W,"true")&&$APP.Ik.h(W,"false")||$APP.H.h(F,B)&&$APP.Ca(ka))return new $APP.T(null,3,5,$APP.U,[$APP.Hk.F(A,$APP.fl,new $APP.T(null,2,5,$APP.U,[bG,cG],null),$APP.Yf(S)),B,null],null);F=OF(A,B, | ||
ka,FF(Hc),W);W=$APP.H.h(aG,va)&&na?null:B;ka=$APP.H.h(aG,va)&&na?null:B;S=$APP.E(S);A=F;B=W;F=ka;O=va}}}();b=$APP.I.j(r,0,null);var u=$APP.I.j(r,1,null);r=$APP.I.j(r,2,null);var y=MF(f,u,$APP.K.h(LF,u));b=NF(b,u,r,y);return $APP.t(a)?$APP.Hk.F(b,$APP.fl,new $APP.T(null,2,5,$APP.U,[bG,eG],null),a):b},hG=function(){var a=fG(),b=bG.g($APP.ud(a));return $APP.X.j(b,gG,$APP.Zj.h(a,bG))},iG=function(a,b){var c=$APP.yf($APP.G(a),b);b=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);return $APP.H.h(b,a)?c:null},mG= | ||
function(){var a=jG,b=hG(),c=$APP.Oe(b),d=$APP.K.h(c,eG),e=$APP.K.h(c,gG);$APP.M.j(function(f,g){f=$APP.Oe(g);var h=$APP.K.h(f,eG),l=$APP.K.h(f,$APP.ls),m=$APP.K.h(f,kG),p=iG(h,d);if($APP.t(p)){var r=function(){var A=null==p?null:$APP.C(p);return null==A?null:$APP.Yf(A)}();f=$APP.t($APP.t(r)?m:r)?function(){var A=$APP.G(r),B=$APP.G(m);return new $APP.T(null,2,5,$APP.U,[$APP.xf.h(A<B?A:B,r),$APP.Jh(m,r)],null)}():new $APP.T(null,2,5,$APP.U,[r,null],null);var u=$APP.I.j(f,0,null);f=$APP.I.j(f,1,null); | ||
var y=$APP.t(f)?$APP.Fl.l($APP.V.h([e,f],0)):e;return $APP.Vc(function(){var A=$APP.X.l(c,lG,u,$APP.V.h([gG,y,$APP.Ls,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},nG=function(a){a=$APP.C(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.ca(null,d);$APP.gm.l($APP.V.h(["Transpiling CLJS file:",e],0));e=$APP.Dt(new $APP.q(null,1,[$APP.At,e],null));e=$APP.Oe(e);e=$APP.K.h(e,$APP.Bt);$APP.gm.l($APP.V.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.C(a))$APP.Hd(a)?(c=$APP.gc(a),a=$APP.hc(a), | ||
b=c,c=$APP.G(c)):(e=$APP.D(a),$APP.gm.l($APP.V.h(["Transpiling CLJS file:",e],0)),b=$APP.Dt(new $APP.q(null,1,[$APP.At,e],null)),b=$APP.Oe(b),b=$APP.K.h(b,$APP.Bt),$APP.gm.l($APP.V.h(["Wrote JS file:",b],0)),a=$APP.E(a),b=null,c=0),d=0;else return null},HF=function HF(a){switch(arguments.length){case 1:return HF.g(arguments[0]);case 2:return HF.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.v.g(arguments.length)].join(""));}}; | ||
HF.g=function(a){return xF(new $APP.q(null,3,[$APP.vq,$APP.sb($APP.oF),$APP.vn,$APP.sb($APP.nF),$APP.np,null],null),a)};HF.h=function(a,b){return xF($APP.hl.j($APP.Fl.l($APP.V.h([new $APP.q(null,1,[$APP.vn,$APP.sb($APP.nF)],null),a],0)),$APP.vq,function(c){return $APP.Fl.l($APP.V.h([$APP.sb($APP.oF),c],0))}),b)};HF.v=2; | ||
var WF=new $APP.Q(null,"spec","spec",347520401),dG=new $APP.Q(null,"boolean","boolean",-1919418404),gG=new $APP.Q(null,"opts","opts",155075701),VF=new $APP.Q(null,"help","help",-439233446),KF=new $APP.Q(null,"coerce-fn","coerce-fn",-821146515),YF=new $APP.Q(null,"no-keyword-opts","no-keyword-opts",761286018),lG=new $APP.Q(null,"rest-cmds","rest-cmds",-423198324),aG=new $APP.Q(null,"keywords","keywords",1526959054),eG=new $APP.Q(null,"cmds","cmds",-1841503952),RF=new $APP.Q(null,"aliases","aliases", | ||
1346874714),XF=new $APP.Q(null,"collect","collect",-284321549),bG=new $APP.Q("org.babashka","cli","org.babashka/cli",1162430315),IF=new $APP.Q("babashka.cli","error","babashka.cli/error",-939678701),kG=new $APP.Q(null,"cmds-opts","cmds-opts",-390130362),SF=new $APP.Q(null,"exec-args","exec-args",-1860766354),JF=new $APP.Q(null,"input","input",556931961),PF=new $APP.Q(null,"coerce","coerce",1917884504),oG=new $APP.Q(null,"show","show",-576705889),ZF=new $APP.Q(null,"closed","closed",-919675359),UF= | ||
new $APP.Q(null,"h","h",1109658740),pG=new $APP.Q(null,"e","e",1381269198),yF=new $APP.Q(null,"s","s",1705939918),$F=new $APP.Q(null,"hyphens","hyphens",2113533609),QF=new $APP.Q(null,"alias","alias",-2039751630),cG=new $APP.Q(null,"args","args",1315556576);var jG=new $APP.T(null,3,5,$APP.U,[new $APP.q(null,3,[eG,new $APP.T(null,1,5,$APP.U,["run"],null),$APP.ls,function(a){a=$APP.Oe(a);a=$APP.K.h(a,gG);a=$APP.Oe(a);a=$APP.K.h(a,$APP.gp);a=$APP.Dt(new $APP.q(null,1,[$APP.At,a],null));a=$APP.Oe(a);a=$APP.K.h(a,$APP.Bt);return shadow_esm_import([$APP.v.g(process.cwd()),"/",$APP.v.g(a)].join(""))},kG,new $APP.T(null,1,5,$APP.U,[$APP.gp],null)],null),new $APP.q(null,2,[eG,new $APP.T(null,1,5,$APP.U,["transpile"],null),$APP.ls,function(a){a=$APP.Oe(a);a=$APP.K.h(a, | ||
lG);return nG(a)}],null),new $APP.q(null,2,[eG,$APP.Xf,$APP.ls,function(a){a=$APP.Oe(a);var b=$APP.K.h(a,lG),c=$APP.K.h(a,gG);a=pG.g(c);if($APP.t(a)){a=$APP.zt(a);var d=$APP.Ct.mkdtempSync(".tmp"),e=[$APP.v.g(d),"/cherry.mjs"].join("");$APP.Ct.writeFileSync(e,a,"utf-8");$APP.t(oG.g(c))&&$APP.gm.l($APP.V.h([a],0));return shadow_esm_import([$APP.v.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Ct.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=VF.g(c);return $APP.t(f)? | ||
f:$APP.H.h("help",$APP.D(b))||$APP.xd(b)}())?$APP.gm.l($APP.V.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Transpile and run a file\ntranspile \x3cfile.cljs\x3e ... Transpile file(s)\nhelp Print this help"],0)):nG(b)}],null)],null);try{mG()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
'use strict';var LF=function(a,b){return $APP.t($APP.t(b)?$APP.Ik.h(b,""):b)?$APP.Oq(a,new $APP.np(new $APP.mp(b,$APP.G(b)))):null},NF=function(a){throw $APP.Fm.h(["Unexpected format: ",$APP.u.g(a)].join(""),new $APP.q(null,1,[MF,a],null));},OF=function(a){var b=JSON.parse(a);return $APP.Jd(b)?b:NF(a)},PF=function(a){var b=JSON.parse(a);return $APP.Nd(b)?b:NF(a)},QF=function(a){var b=JSON.parse(a);return $APP.Od(b)?b:NF(a)},RF=function(a){var b=JSON.parse(a);return"number"===typeof b?b:NF(a)},SF= | ||
function(a){return $APP.H.h(":",0<a.length?a.charAt(0):null)?$APP.ii.g($APP.Zh.h(a,1)):$APP.ii.g(a)},TF=function(a){return $APP.yd(a)?$APP.C(a):a},UF=function(a){if("string"===typeof a)try{var b=0<a.length?a.charAt(0):null;if($APP.H.h("true",a)||$APP.H.h("false",a))var c=OF(a);else{if($APP.Ca(isNaN(a)))var d=RF(a);else{var e=$APP.H.h(":",b);var f=e?$APP.Xh(/:?[a-zA-Z0-9]+/,a):e;d=$APP.t(f)?SF(a):a}c=d}return c}catch(g){return a}else return a},ZF=function(a,b){var c=function(){switch(b instanceof $APP.P? | ||
b.Na:null){case "boolean":return OF;case "int":case "long":return PF;case "double":return QF;case "number":return RF;case "symbol":return $APP.ti;case "keyword":return SF;case "string":return $APP.ce;case "edn":return VF;case "auto":return UF;default:return b}}();if("string"===typeof a){try{var d=c.g?c.g(a):c.call(null,a)}catch(e){d=WF}if($APP.H.h(WF,d))throw $APP.Fm.h(["Coerce failure: cannot transform input ",$APP.bm.l($APP.U.h([a],0)),b instanceof $APP.P?" to ":" with ",$APP.u.g(b instanceof $APP.P? | ||
$APP.Jh(b):b)].join(""),new $APP.q(null,2,[XF,a,YF,b],null));return d}return a},$F=function(a,b,c){a=$APP.K.h(a,b);c=$APP.t(a)?a:$APP.yd(c)?$APP.od(c):null;return $APP.t(c)?$APP.yd(c)?$APP.Nk.h($APP.ne,c):c:null},aG=function(a,b,c,d){return $APP.Ik.h(b,c)?$APP.hl.j(a,b,function(e){return null==e?$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):!0:$APP.t(d)?d.h?d.h(e,!0):d.call(null,e,!0):e}):a},bG=function(a,b,c,d,e){d=$APP.t($APP.t(d)?!$APP.yd(d):d)?ZF(e,d):UF(e);return $APP.t(c)?$APP.hl.F(a,b,c,d):$APP.X.j(a, | ||
b,d)},gG=function(a){return $APP.Zd.j(function(b,c){var d=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);c=$APP.Pe(c);var e=$APP.K.h(c,cG),f=$APP.K.h(c,dG);c=$APP.K.h(c,$APP.vn);b=$APP.t(e)?$APP.hl.J(b,cG,$APP.X,d,e):b;b=$APP.t(f)?$APP.hl.j(b,eG,function(g){if($APP.Qd(g,f))throw $APP.Fm.h(["Conflicting alias ",$APP.u.g(f)," between ",$APP.u.g($APP.K.h(g,f))," and ",$APP.u.g(d)].join(""),new $APP.q(null,1,[dG,f],null));return $APP.X.j(g,f,d)}):b;return $APP.t(c)?$APP.hl.J(b,fG,$APP.X,d,c):b},$APP.Oe,a)}, | ||
tG=function(){var a=process.argv.slice(2),b=new $APP.q(null,1,[eG,new $APP.q(null,1,[hG,iG],null)],null),c=jG.g(b);b=$APP.t(c)?$APP.Fl.l($APP.U.h([b,$APP.t(c)?gG(c):null],0)):b;var d=cG.g(b),e=eG.g(b),f=kG.g(b),g=fG.g(b),h=lG.g(b),l=$APP.H.h(!0,mG.g(b))?function(){var A=null==c?null:$APP.yh(c);A=null==A?null:$APP.Y.h(A,$APP.yh(e));A=null==A?null:$APP.Y.h(A,$APP.yh(d));return null==A?null:$APP.Hh(A)}():mG.g(b);a=$APP.Uh(function(A){var D=$APP.t(h)?null:0==A.lastIndexOf(":",0);return!($APP.t(D)?D:0== | ||
A.lastIndexOf("-",0))},a);var n=$APP.I.j(a,0,null),p=$APP.I.j(a,1,null);a=function(){var A=$APP.B(n);return null==A?null:$APP.Zf(A)}();var r=function(){for(var A=$APP.t(g)?g:$APP.Oe,D=null,F=null,O=$APP.t(h)?nG:null,S=$APP.B(p);;){if($APP.Ca(S))return new $APP.R(null,3,5,$APP.T,[A,D,F],null);var W=$APP.C(S),ka=$F(f,D,$APP.K.h(d,D)),va=0<W.length?W.charAt(0):null,yb=$APP.H.h(va,"-"),Qb=function(){var jd=O;return $APP.t(jd)?jd:yb?nG:null}(),na=$APP.H.h(":",va),Xb=$APP.Ik.h(nG,Qb)&&na&&($APP.Ca(D)|| | ||
$APP.H.h(F,D));va=function(){var jd=Qb;return $APP.t(jd)?jd:Xb?oG:null}();if(yb||Xb){var Ua=(na=0==W.lastIndexOf("--",0))&&$APP.H.h("--",W);if(Ua){var Fd=$APP.E(S);return new $APP.R(null,3,5,$APP.T,[function(){var jd=A;return Fd?$APP.Hk.F(jd,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,qG],null),$APP.Zf(Fd)):jd}(),D,F],null)}Ua=na?$APP.Zh.h(W,2):$APP.To(W,/^(:|-|)/,"");na=na?$APP.Xo(Ua,/=/):new $APP.R(null,1,5,$APP.T,[Ua],null);Ua=$APP.I.j(na,0,null);na=$APP.I.j(na,1,null);Ua=$APP.ii.g(Ua);Ua=$APP.K.j(e, | ||
Ua,Ua);if($APP.t($APP.t(l)?$APP.Ca($APP.K.h(l,Ua)):l))throw $APP.Fm.h(["Unknown option ",$APP.u.g(W)].join(""),new $APP.q(null,1,[mG,l],null));$APP.t(na)?(D=aG(A,D,F,ka),F=Ua,S=$APP.N(na,$APP.Jc(S)),A=D,D=F,F=null,O=va):(D=aG(A,D,F,ka),W=Ua,S=$APP.E(S),A=D,D=W,O=va)}else{var Kc=$APP.K.h(d,D);if(Ua=$APP.H.h(rG,Kc)&&$APP.Ca(F)&&$APP.Ik.h(W,"true")&&$APP.Ik.h(W,"false")||$APP.H.h(F,D)&&$APP.Ca(ka))return new $APP.R(null,3,5,$APP.T,[$APP.Hk.F(A,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,qG],null),$APP.Zf(S)), | ||
D,null],null);F=bG(A,D,ka,TF(Kc),W);W=$APP.H.h(oG,va)&&na?null:D;ka=$APP.H.h(oG,va)&&na?null:D;S=$APP.E(S);A=F;D=W;F=ka;O=va}}}();b=$APP.I.j(r,0,null);var v=$APP.I.j(r,1,null);r=$APP.I.j(r,2,null);var y=$F(f,v,$APP.K.h(ZF,v));b=aG(b,v,r,y);return $APP.t(a)?$APP.Hk.F(b,$APP.fl,new $APP.R(null,2,5,$APP.T,[pG,sG],null),a):b},vG=function(){var a=tG(),b=pG.g($APP.ud(a));return $APP.X.j(b,uG,$APP.Zj.h(a,pG))},wG=function(a,b){var c=$APP.zf($APP.G(a),b);b=$APP.I.j(c,0,null);c=$APP.I.j(c,1,null);return $APP.H.h(b, | ||
a)?c:null},AG=function(){var a=xG,b=vG(),c=$APP.Pe(b),d=$APP.K.h(c,sG),e=$APP.K.h(c,uG);$APP.Zd.j(function(f,g){f=$APP.Pe(g);var h=$APP.K.h(f,sG),l=$APP.K.h(f,$APP.Cs),n=$APP.K.h(f,yG),p=wG(h,d);if($APP.t(p)){var r=function(){var A=null==p?null:$APP.B(p);return null==A?null:$APP.Zf(A)}();f=$APP.t($APP.t(r)?n:r)?function(){var A=$APP.G(r),D=$APP.G(n);return new $APP.R(null,2,5,$APP.T,[$APP.xf.h(A<D?A:D,r),$APP.Kh(n,r)],null)}():new $APP.R(null,2,5,$APP.T,[r,null],null);var v=$APP.I.j(f,0,null);f=$APP.I.j(f, | ||
1,null);var y=$APP.t(f)?$APP.Fl.l($APP.U.h([e,f],0)):e;return $APP.Vc(function(){var A=$APP.X.l(c,zG,v,$APP.U.h([uG,y,$APP.bt,h],0));return l.g?l.g(A):l.call(null,A)}())}return null},null,a)},BG=function(a){a=$APP.B(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.ca(null,d);$APP.gm.l($APP.U.h(["Transpiling CLJS file:",e],0));e=$APP.Ut(new $APP.q(null,1,[$APP.Rt,e],null));e=$APP.Pe(e);e=$APP.K.h(e,$APP.St);$APP.gm.l($APP.U.h(["Wrote JS file:",e],0));d+=1}else if(a=$APP.B(a))$APP.Hd(a)?(c=$APP.gc(a),a= | ||
$APP.hc(a),b=c,c=$APP.G(c)):(e=$APP.C(a),$APP.gm.l($APP.U.h(["Transpiling CLJS file:",e],0)),b=$APP.Ut(new $APP.q(null,1,[$APP.Rt,e],null)),b=$APP.Pe(b),b=$APP.K.h(b,$APP.St),$APP.gm.l($APP.U.h(["Wrote JS file:",b],0)),a=$APP.E(a),b=null,c=0),d=0;else return null},VF=function VF(a){switch(arguments.length){case 1:return VF.g(arguments[0]);case 2:return VF.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.u.g(arguments.length)].join(""));}}; | ||
VF.g=function(a){return LF(new $APP.q(null,3,[$APP.Nq,$APP.sb($APP.CF),$APP.vn,$APP.sb($APP.BF),$APP.Fp,null],null),a)};VF.h=function(a,b){return LF($APP.hl.j($APP.Fl.l($APP.U.h([new $APP.q(null,1,[$APP.vn,$APP.sb($APP.BF)],null),a],0)),$APP.Nq,function(c){return $APP.Fl.l($APP.U.h([$APP.sb($APP.CF),c],0))}),b)};VF.v=2; | ||
var jG=new $APP.P(null,"spec","spec",347520401),rG=new $APP.P(null,"boolean","boolean",-1919418404),uG=new $APP.P(null,"opts","opts",155075701),iG=new $APP.P(null,"help","help",-439233446),YF=new $APP.P(null,"coerce-fn","coerce-fn",-821146515),lG=new $APP.P(null,"no-keyword-opts","no-keyword-opts",761286018),zG=new $APP.P(null,"rest-cmds","rest-cmds",-423198324),oG=new $APP.P(null,"keywords","keywords",1526959054),sG=new $APP.P(null,"cmds","cmds",-1841503952),eG=new $APP.P(null,"aliases","aliases", | ||
1346874714),kG=new $APP.P(null,"collect","collect",-284321549),pG=new $APP.P("org.babashka","cli","org.babashka/cli",1162430315),WF=new $APP.P("babashka.cli","error","babashka.cli/error",-939678701),yG=new $APP.P(null,"cmds-opts","cmds-opts",-390130362),fG=new $APP.P(null,"exec-args","exec-args",-1860766354),XF=new $APP.P(null,"input","input",556931961),cG=new $APP.P(null,"coerce","coerce",1917884504),CG=new $APP.P(null,"show","show",-576705889),mG=new $APP.P(null,"closed","closed",-919675359),hG= | ||
new $APP.P(null,"h","h",1109658740),DG=new $APP.P(null,"e","e",1381269198),MF=new $APP.P(null,"s","s",1705939918),nG=new $APP.P(null,"hyphens","hyphens",2113533609),dG=new $APP.P(null,"alias","alias",-2039751630),qG=new $APP.P(null,"args","args",1315556576);var xG=new $APP.R(null,3,5,$APP.T,[new $APP.q(null,3,[sG,new $APP.R(null,1,5,$APP.T,["run"],null),$APP.Cs,function(a){a=$APP.Pe(a);a=$APP.K.h(a,uG);a=$APP.Pe(a);a=$APP.K.h(a,$APP.zo);a=$APP.Ut(new $APP.q(null,1,[$APP.Rt,a],null));a=$APP.Pe(a);a=$APP.K.h(a,$APP.St);return shadow_esm_import([$APP.u.g(process.cwd()),"/",$APP.u.g(a)].join(""))},yG,new $APP.R(null,1,5,$APP.T,[$APP.zo],null)],null),new $APP.q(null,2,[sG,new $APP.R(null,1,5,$APP.T,["transpile"],null),$APP.Cs,function(a){a=$APP.Pe(a);a=$APP.K.h(a, | ||
zG);return BG(a)}],null),new $APP.q(null,2,[sG,$APP.Yf,$APP.Cs,function(a){a=$APP.Pe(a);var b=$APP.K.h(a,zG),c=$APP.K.h(a,uG);a=DG.g(c);if($APP.t(a)){a=$APP.Qt(a);var d=$APP.Tt.mkdtempSync(".tmp"),e=[$APP.u.g(d),"/cherry.mjs"].join("");$APP.Tt.writeFileSync(e,a,"utf-8");$APP.t(CG.g(c))&&$APP.gm.l($APP.U.h([a],0));return shadow_esm_import([$APP.u.g(process.cwd()),"/",e].join("")).finally(function(){return $APP.Tt.rmSync(d,{force:!0,recursive:!0})})}return $APP.t(function(){var f=iG.g(c);return $APP.t(f)? | ||
f:$APP.H.h("help",$APP.C(b))||$APP.xd(b)}())?$APP.gm.l($APP.U.h(["Cherry v0.0.0\n\nUsage:\n\nrun \x3cfile.cljs\x3e Transpile and run a file\ntranspile \x3cfile.cljs\x3e ... Transpile file(s)\nhelp Print this help"],0)):BG(b)}],null)],null);try{AG()}catch(a){throw console.error("An error occurred when calling (cherry.internal.cli/init)"),a;}; | ||
export { $APP, shadow$provide, $jscomp }; |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "0.0.0-alpha.34", | ||
"version": "0.0.0-alpha.35", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "cljs.core.js", |
## Cherry :cherries: | ||
Experimental and tiny CLJS transpiler | ||
Experimental CLJS compiler: reducing friction between ClojureScript and JS tooling | ||
@@ -41,4 +41,13 @@ > :warning: This project is an experiment and not recommended to be used in | ||
Also see the [wordle](https://borkdude.github.io/cherry/examples/wordle/index.html) and [react](https://borkdude.github.io/cherry/examples/react/index.html) examples. | ||
## Examples | ||
A few examples of currenly working projects compiled by cherry: | ||
- [wordle](https://borkdude.github.io/cherry/examples/wordle/index.html) | ||
- [react](https://borkdude.github.io/cherry/examples/react/index.html) | ||
- [vite](examples/vite) | ||
- [cherry-action-example](https://github.com/borkdude/cherry-action-example) | ||
See the [examples](examples) directory for more. | ||
## Project goals | ||
@@ -96,2 +105,10 @@ | ||
## Funding | ||
This project is developed with the following partners, either by funding time | ||
and/or money: | ||
- [Nextjournal](https://nextjournal.com/) | ||
- The main author's [Github Sponsors](https://github.com/sponsors/borkdude) | ||
Here is the original readme of Scriptjure: | ||
@@ -98,0 +115,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
594389
3355
354