UNPKG

@nice-move/cli

Version:
2 lines 747 B
#!/usr/bin/env node import{a as e,i as t}from"./git-hooks-CdVA29rN.mjs";import{a as n,i as r}from"./lint--RNaRy9G.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=`./`]}){e(`svgo`,[`-r`,`-q`,`--pretty`,`--indent`,`2`,`--config`,i(import.meta.url).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();export{};