diff --git a/ts/tsbundle.cli.ts b/ts/tsbundle.cli.ts index 80e6d94..0041fa5 100644 --- a/ts/tsbundle.cli.ts +++ b/ts/tsbundle.cli.ts @@ -37,6 +37,22 @@ export const runCli = async () => { } }); + tsBundleCli.addCommand('npm').subscribe(async argvArg => { + const tsbundle = new TsBundle(); + // const htmlHandler = new HtmlHandler(); + switch (true) { + case argvArg.production || process.env.CI: + await tsbundle.buildProduction('./ts/index.ts', './dist_ts/bundle.js'); + // await htmlHandler.minifyHtml(); + break; + case argvArg.test: + default: + await tsbundle.buildTest('./ts/index.ts', './dist_ts/bundle.js'); + // await htmlHandler.copyHtml(); + return; + } + }); + tsBundleCli.addCommand('website').subscribe(async argvArg => { const tsbundle = new TsBundle(); const htmlHandler = new HtmlHandler();