ducki
Version:
Simple CLI for working with KiCad projects.
23 lines (16 loc) • 486 B
text/typescript
import { join } from "path";
import { Script } from "./script.js";
const argv = process.argv.slice(2);
// No folder specified; use current folder
if (argv.length === 0) { argv.push("."); }
(async function() {
for (const path of argv) {
try {
const script = new Script(join(path, "ducki.js"));
await script.run();
} catch (e: any) {
console.log(`Error: ${ e.message } (${ path })`);
}
}
})();