@nice-move/cli
Version:
Frontend develop helper for frontend development
2 lines • 846 B
JavaScript
import{execa as e,git_hooks_exports as t}from"./git-hooks-DAgct2kR.mjs";import"./path-key-DNlqev5T.mjs";import"./mjs-D7OvYRUm.mjs";import{isReachable as n,lint_exports as r}from"./lint-BoG2Et94.mjs";import{createRequire as i}from"node:module";import{Cheetor as a}from"cheetor";function o(){if(n(`svgo/package.json`)&&n(`svgo-config/package.json`))return{command:`svgo`,describe:"Run `svgo` to optimize `*.svg`",handler({_:[t,n=`./`]}){let r=i(import.meta.url);e(`svgo`,[`-r`,`-q`,`--pretty`,`--indent`,`2`,`--config`,r.resolve(`svgo-config`),`-f`,n]).then(()=>{console.log(`Done: calling svgo`)}).catch(e=>{process.exitCode=1,console.error(`Error:`,e.message)})}}}process.on(`SIGINT`,()=>{}),new a(`../package.json`,import.meta.url).website(`https://www.npmjs.com/org/nice-move`).command(r).command(t).commandSmart(o).setup();