Merge pull request #8645 from backstage/build-cli-minify-code

Add minify option to build command
This commit is contained in:
Patrik Oldsberg
2021-12-27 18:40:43 +01:00
committed by GitHub
4 changed files with 9 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Add option to build command for minifying the generated code
+2 -1
View File
@@ -434,7 +434,8 @@ Usage: backstage-cli build [options]
Options:
--outputs <formats> List of formats to output [types,cjs,esm]
-h, --help display help for command
--minify Minify the generated code
-h, --help display help for command
```
## lint
+1 -1
View File
@@ -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 });
};
+1
View File
@@ -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