summaryrefslogtreecommitdiff
path: root/dev/bin
diff options
context:
space:
mode:
authorHarrison <gieraltowski.har@gmail.com>2024-03-02 23:50:47 -0500
committerGitHub <noreply@github.com>2024-03-03 04:50:47 +0000
commit74e726afe4d2b3cc94643408582cd5601924677f (patch)
treed4529cee303b93db455170aa6eeda7b2149a5b24 /dev/bin
parent5e85bc5708c94d006e44f1e05c66280e13e8c660 (diff)
Support build.js target positional arguments (#759)
Diffstat (limited to 'dev/bin')
-rw-r--r--dev/bin/build.js4
1 files changed, 2 insertions, 2 deletions
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 {