feat(napi): add -p flag which will be bypassed to cargo
This commit is contained in:
parent
96190f1c80
commit
8de30a9287
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,10 @@ export class BuildCommand extends Command {
|
|||
)} file, relative to cwd`,
|
||||
})
|
||||
|
||||
project = Option.String('-p', {
|
||||
description: `Bypass to ${chalk.green('cargo -p')}`,
|
||||
})
|
||||
|
||||
cargoFlags = Option.String('--cargo-flags', '', {
|
||||
description: `All the others flag passed to ${chalk.yellow('cargo')}`,
|
||||
})
|
||||
|
@ -123,10 +127,12 @@ export class BuildCommand extends Command {
|
|||
}).toString('utf8'),
|
||||
)
|
||||
debug(`Current triple is: ${chalk.green(triple.raw)}`)
|
||||
const pFlag = this.project ? `-p ${this.project}` : ''
|
||||
const externalFlags = [
|
||||
releaseFlag,
|
||||
targetFlag,
|
||||
featuresFlag,
|
||||
pFlag,
|
||||
this.cargoFlags,
|
||||
]
|
||||
.filter((flag) => Boolean(flag))
|
||||
|
|
Loading…
Reference in a new issue