UNPKG

@infinityfx/fluid

Version:

React UI library, using zero-runtime CSS-in-JS.

3 lines (2 loc) 1.57 kB
import{purge as o,compileComponents as n,compileIcons as e,compileTypes as i}from"./compile.js";import{getContext as l,printProgress as s,getIOHelper as t,emptyStats as c,printStats as a}from"./utils.js";const r=[{name:"@infinityfx/splash",entries:[{file:"index.js",inject:"Splash"}]},{name:"@infinityfx/text-editor",entries:[{file:"index.js",inject:"Editor"}]}];async function f(f){const{isInternal:m,name:d,version:g}=await l(/^-{1,2}d(ev)?/.test(f)),u=[{name:"@infinityfx/fluid",entries:[{file:"index.js",inject:"FluidProvider"},{file:"hooks.js",shallow:!0}]}];m||u.unshift(...r),console.log(`\r\n> ${d} v${g}\n`),s(0);const p=u.map((({name:o,entries:n})=>{const e=t(`node_modules/${o}/`,m);return e?{io:e,entries:n}:null})).filter((o=>!!o)),x=c(p.length);for(await Promise.all(p.map((({io:n,entries:e})=>o(n,e)))),x.index=0;x.index<x.entries;x.index++){const{io:o,entries:l}=p[x.index];await n(o,l,x),"fluid"===o.parent&&(await e(o),await i(o))}a(x)}function m(){console.log(),console.log("Commands:"),console.log(),console.log("compile compile fluid components using the current theme"),console.log()}async function d(o){const{name:n,version:e}=await l();o?(console.log(`'${o}' is not recognized as a fluid command.`),console.log(),console.log("Run 'fluid help' for a list of commands.")):(console.log(),console.log(`${n} v${e}`),console.log(),console.log("Usage: fluid <command>"),console.log(),console.log("Run 'fluid help' for a list of commands."),console.log())}export{f as compile,d as fallback,m as help}; //# sourceMappingURL=commands.js.map