From 7e5202582a90f665fc67d16bbedee1b8f03eef15 Mon Sep 17 00:00:00 2001 From: rowan Date: Mon, 6 Jan 2025 02:31:31 -0600 Subject: [PATCH] fix flag mispelling --- .gitignore | 1 + bevy-cli | 6 ++++++ src/config.js | 4 ++-- src/index.js | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100755 bevy-cli diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/bevy-cli b/bevy-cli new file mode 100755 index 0000000..27d41df --- /dev/null +++ b/bevy-cli @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +BASEDIR=$(realpath $(dirname $0)) + +node "$BASEDIR/src/index.js" $@ + diff --git a/src/config.js b/src/config.js index ea1db98..4c5de21 100644 --- a/src/config.js +++ b/src/config.js @@ -28,7 +28,7 @@ export const DynamicLinking = Object.freeze({ }) export const DevelopmentOptimizations = Object.freeze({ - active: ({ dynopts }) => dynopts, + active: ({ dynopt }) => dynopt, apply: curry((_params, project) => map( 'Cargo.toml', @@ -40,7 +40,7 @@ export const DevelopmentOptimizations = Object.freeze({ }) export const ReleaseOptimizations = Object.freeze({ - active: ({ relopts }) => relopts, + active: ({ relopt }) => relopt, apply: curry((_params, project) => { const relOpts = { 'codegen-units': 1, lto: 'thin' } const wasmOpts = { inherits: 'release', 'opt-level': 's', strip: 'debuginfo' } diff --git a/src/index.js b/src/index.js index 0699ad7..7911bd4 100644 --- a/src/index.js +++ b/src/index.js @@ -57,7 +57,7 @@ const defaultLinker = () => process.platform === 'darwin' ? undefined : 'lld' const schema = Object.freeze({ string: ['bevy-version', 'linker'], boolean: ['devopt', 'relopt', 'dynlink', 'nightly', 'cranelift', 'genshare', 'parallel', 'version'], - alias: { b: 'bevy-version', l: 'linker', g: 'genshare', c: 'cranelift', n: 'nightly', d: 'dynlink', p: 'parallel', v: 'version', h: 'help' }, + alias: { b: 'bevy-version', l: 'linker', q: 'devopt', r: 'relopt', g: 'genshare', c: 'cranelift', n: 'nightly', d: 'dynlink', p: 'parallel', v: 'version', h: 'help' }, default: { 'bevy-version': await defaultBevyVersion(), devopt: true, relopt: true, genshare: true, parallel: true, cranelift: true, nightly: true, dynlink: true, linker: defaultLinker() } })