support direct execution w/o the bin stub

This commit is contained in:
kamal 2025-06-03 15:04:48 -04:00
parent bf681ddc24
commit 7efaacc5b1

View File

@ -85,6 +85,11 @@ program
// Export the program object for use in bin stub
export { program };
// Run the program if this file is executed directly
if (import.meta.url === `file://${process.argv[1]}`) {
program.parse();
}
/**
* Main function to run the generator
*/