Add minify option to backend:build
Co-authored-by: Ainhoa Larumbe <ainhoal@spotify.com> Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { buildPackage, Output } from '../../lib/builder';
|
||||
|
||||
export default async () => {
|
||||
export default async (cmd: Command) => {
|
||||
await buildPackage({
|
||||
outputs: new Set([Output.cjs, Output.types]),
|
||||
minify: cmd.minify,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@ export function registerCommands(program: CommanderStatic) {
|
||||
program
|
||||
.command('backend:build')
|
||||
.description('Build a backend plugin')
|
||||
.option('--minify', 'Minify the generated code')
|
||||
.action(lazy(() => import('./backend/build').then(m => m.default)));
|
||||
|
||||
program
|
||||
|
||||
Reference in New Issue
Block a user