@ycmd/commands
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
7 lines (5 loc) • 1.85 kB
JavaScript
import { createCommand, isEnvSkip, pnpmRecursive, getCwdInfo, shell } from 'ycmd';
var i={watch:{alias:"w",describe:"monitor files for changes",type:"boolean",default:!1},prod:{alias:"p",describe:"enable code optimization for production",type:"boolean",default:!1},silent:{alias:["s","q","quiet"],describe:"run in silent mode, show errors only",type:"boolean",default:!1},exec:{alias:"e",describe:"executes after compilation",type:["boolean","string"],default:!1},dry:{alias:["d","dry-run","without-publish"],describe:"run in dry mode, without publishing",type:"boolean",default:!1},dist:{describe:"specify the output directory",type:"string"},force:{alias:["f"],describe:"force to run",type:"boolean",default:!1},dts:{describe:"generate dts files",type:"boolean",default:!0},yes:{alias:["y"],describe:"automatically say yes to all prompts",type:"boolean",default:!1},bail:{alias:"b",describe:"stop running after the first failure",type:"boolean",default:!1},clean:{alias:"c",describe:"clean the output directory before building",type:"boolean",default:!1}};var I=createCommand({command:"build [-w][-p][-s][-e]",describe:"build project",builder:e=>e.options({watch:i.watch,prod:i.prod,silent:i.silent,exec:i.exec,dist:i.dist}),async main({argv:e,isRoot:l,log:a,cwd:o,ctx:t}){if(isEnvSkip(["build","builds"])){a.warn("SKIP_BUILD");return}if(l){await pnpmRecursive("run build --prod --silent",{ctx:t,argv:e});return}let{isJs:d,isTs:r,isNest:n,isBabel:u,isSwc:b}=await getCwdInfo({cwd:o});n?await shell("ycmd build:nest",{ctx:t,argv:e}):b?await shell("ycmd build:swc",{ctx:t,argv:e}):u?await shell("ycmd build:babel",{ctx:t,argv:e}):r?await shell("ycmd build:ts",{ctx:t,argv:e}):d?a.debug("[skip] no need to build js projects"):a.error("UNKNOWN TYPE");}});
export { I as default };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=build.js.map