cli: allow passing --config option to repo build command

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2022-11-07 18:30:52 +00:00
parent 93be81bba6
commit 23484ac442
4 changed files with 13 additions and 1 deletions
+1
View File
@@ -35,6 +35,7 @@ export function registerRepoCommand(program: Command) {
.description(
'Build packages in the project, excluding bundled app and backend packages.',
)
.option(...configOption)
.option(
'--all',
'Build all packages, including bundled app and backend packages.',
+6 -1
View File
@@ -152,9 +152,14 @@ export async function command(opts: OptionValues, cmd: Command): Promise<void> {
);
return;
}
const configPaths = opts.config?.length
? opts.config
: buildOptions.config ?? [];
await buildFrontend({
targetDir: pkg.dir,
configPaths: (buildOptions.config as string[]) ?? [],
configPaths,
writeStats: Boolean(buildOptions.stats),
});
},