From 7f231ee24134c2a0a4c8bc2beba15eb583a0fc34 Mon Sep 17 00:00:00 2001 From: Sam Gaus Date: Wed, 5 Jun 2024 09:58:42 +0100 Subject: [PATCH] ESM baby --- .../greenbox-script/{babel.config.js => babel.config.cjs} | 0 packages/greenbox-script/src/greenbox.ts | 4 +--- 2 files changed, 1 insertion(+), 3 deletions(-) rename packages/greenbox-script/{babel.config.js => babel.config.cjs} (100%) diff --git a/packages/greenbox-script/babel.config.js b/packages/greenbox-script/babel.config.cjs similarity index 100% rename from packages/greenbox-script/babel.config.js rename to packages/greenbox-script/babel.config.cjs diff --git a/packages/greenbox-script/src/greenbox.ts b/packages/greenbox-script/src/greenbox.ts index a3414aa..bae2f1e 100644 --- a/packages/greenbox-script/src/greenbox.ts +++ b/packages/greenbox-script/src/greenbox.ts @@ -256,7 +256,7 @@ function checkMeta() { const hasFlag = (args: string, ...flags: string[]) => flags.some((f) => args.includes(f)); -function main(args = ""): void { +export function main(args = ""): void { if (hasFlag(args, "--help", "-h")) { printHtml(` Usage: @@ -323,5 +323,3 @@ function main(args = ""): void { `All done! To see your greenboxes, visit: ${link}`, ); } - -module.exports.main = main;