fix(cli): dts pipe (#1532)
This commit is contained in:
parent
3d48d4464b
commit
0f0837f5ca
1 changed files with 17 additions and 3 deletions
|
@ -646,14 +646,28 @@ export class BuildCommand extends Command {
|
||||||
jsBindingFilePath,
|
jsBindingFilePath,
|
||||||
idents,
|
idents,
|
||||||
)
|
)
|
||||||
if (this.pipe && jsBindingFilePath) {
|
if (this.pipe) {
|
||||||
const pipeCommand = `${this.pipe} ${jsBindingFilePath}`
|
if (jsBindingFilePath) {
|
||||||
|
const pipeCommand = `${this.pipe} ${jsBindingFilePath}`
|
||||||
|
console.info(`Run ${chalk.green(pipeCommand)}`)
|
||||||
|
try {
|
||||||
|
execSync(pipeCommand, { stdio: 'inherit', env: commandEnv })
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(
|
||||||
|
chalk.bgYellowBright(
|
||||||
|
'Pipe the js binding file to command failed',
|
||||||
|
),
|
||||||
|
e,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const pipeCommand = `${this.pipe} ${dtsFilePath}`
|
||||||
console.info(`Run ${chalk.green(pipeCommand)}`)
|
console.info(`Run ${chalk.green(pipeCommand)}`)
|
||||||
try {
|
try {
|
||||||
execSync(pipeCommand, { stdio: 'inherit', env: commandEnv })
|
execSync(pipeCommand, { stdio: 'inherit', env: commandEnv })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(
|
console.warn(
|
||||||
chalk.bgYellowBright('Pipe the js binding file to command failed'),
|
chalk.bgYellowBright('Pipe the dts file to command failed'),
|
||||||
e,
|
e,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue