From 12737352502d532be2471fce126c765879d178c5 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 8 Dec 2023 13:56:17 +0800 Subject: [PATCH] fix(cli): manifestPath and js binding output path (#1847) --- cli/src/api/build.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/src/api/build.ts b/cli/src/api/build.ts index 7cc1c49b..cc2980fd 100644 --- a/cli/src/api/build.ts +++ b/cli/src/api/build.ts @@ -556,6 +556,10 @@ class Builder { this.args.push('--profile', this.options.profile) } + if (this.options.manifestPath) { + this.args.push('--manifest-path', this.options.manifestPath) + } + if (this.options.cargoOptions?.length) { this.args.push(...this.options.cargoOptions) } @@ -745,7 +749,7 @@ class Builder { return } - const name = parse(this.options.jsBinding ?? 'index.js').name + const name = this.options.jsBinding ?? 'index.js' const cjs = createCjsBinding( this.config.binaryName, @@ -754,7 +758,7 @@ class Builder { ) try { - const dest = join(this.outputDir, `${name}.js`) + const dest = join(this.outputDir, name) debug('Writing js binding to:') debug(' %i', dest) await writeFileAsync(dest, cjs, 'utf-8')