Add minify option to build command
Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
@@ -33,5 +33,5 @@ export default async (cmd: Command) => {
|
||||
outputs = new Set([Output.types, Output.esm, Output.cjs]);
|
||||
}
|
||||
|
||||
await buildPackage({ outputs });
|
||||
await buildPackage({ outputs, minify: cmd.minify });
|
||||
};
|
||||
|
||||
@@ -138,6 +138,7 @@ export function registerCommands(program: CommanderStatic) {
|
||||
.command('build')
|
||||
.description('Build a package for publishing')
|
||||
.option('--outputs <formats>', 'List of formats to output [types,cjs,esm]')
|
||||
.option('--minify', 'Minify the generated code')
|
||||
.action(lazy(() => import('./build').then(m => m.default)));
|
||||
|
||||
program
|
||||
|
||||
Reference in New Issue
Block a user