CLI and config file support
This commit is contained in:
20
bin/scripts/copy-cli.js
Executable file
20
bin/scripts/copy-cli.js
Executable 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();
|
||||
Reference in New Issue
Block a user