@ycmd/commands
Version:
LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials
9 lines (6 loc) • 1.79 kB
JavaScript
;
var ycmd = require('ycmd');
var t={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 g=ycmd.createCommand({command:"build:babel [-w]",describe:"build Babel project",builder:i=>i.options({watch:t.watch,prod:t.prod,silent:t.silent,dist:t.dist}),async main({isRoot:i,ctx:a,cwd:d,argv:r}){if(i){await ycmd.shellParallel("ycmd build:babel",{ctx:a,argv:r});return}let{watch:s=!1,dist:l="lib"}=r;s||await ycmd.shell(`rm -rf ${l}`,{ctx:a,silence:!0}),await ycmd.shell(`mkdir -p ${l}`,{ctx:a,silence:!0});let{isApp:c}=await ycmd.getCwdInfo({cwd:d}),e;c&&s?(e=ycmd.findBin("babel-node"),e+=" src"):(e=ycmd.findBin("babel"),e+=` src --out-dir ${l} --source-maps true --extensions ".js,.jsx,.ts,.tsx" --copy-files`,s&&(e+=" --watch")),await ycmd.shell(e,{ctx:a});}});
module.exports = g;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=build-babel.js.map