From 74e726afe4d2b3cc94643408582cd5601924677f Mon Sep 17 00:00:00 2001 From: Harrison Date: Sat, 2 Mar 2024 23:50:47 -0500 Subject: Support build.js target positional arguments (#759) --- dev/bin/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/bin') diff --git a/dev/bin/build.js b/dev/bin/build.js index 26fbff07..ad6254b5 100644 --- a/dev/bin/build.js +++ b/dev/bin/build.js @@ -247,7 +247,7 @@ export async function main() { }; const argv = process.argv.slice(2); - const {values: args} = parseArgs({args: argv, options: parseArgsConfigOptions}); + const {values: args, positionals: targets} = parseArgs({args: argv, options: parseArgsConfigOptions, allowPositionals: true}); const dryRun = /** @type {boolean} */ (args.dryRun); const dryRunBuildZip = /** @type {boolean} */ (args.dryRunBuildZip); @@ -265,7 +265,7 @@ export async function main() { const variantNames = /** @type {string[]} */ (( argv.length === 0 || args.all ? manifestUtil.getVariants().filter(({buildable}) => buildable !== false).map(({name}) => name) : - [] + targets )); await build(buildDir, extDir, manifestUtil, variantNames, manifestPath, dryRun, dryRunBuildZip, yomitanVersion); } finally { -- cgit v1.2.3