CLI and config file support

This commit is contained in:
Nicolas Barraud
2025-03-30 15:57:29 -04:00
parent a63de622f8
commit 5b22143c85
10 changed files with 453 additions and 249 deletions

20
bin/scripts/copy-cli.js Executable file
View File

@@ -0,0 +1,20 @@
/**
* Cross-platform script to copy the built file to cli.js
*/
import { promises as fs } from "fs";
import path from "path";
const SOURCE_FILE = path.resolve("build/index.js");
const TARGET_FILE = path.resolve("cli.js");
async function copyFile() {
try {
await fs.copyFile(SOURCE_FILE, TARGET_FILE);
console.log(`Successfully copied ${SOURCE_FILE} to ${TARGET_FILE}`);
} catch (error) {
console.error("Error copying file:", error);
process.exit(1);
}
}
copyFile();