| 7 | const packageJsonPath = "./package.json"; |
| 8 | |
| 9 | const runCommand = command => |
| 10 | new Promise((resolve, reject) => { |
| 11 | const [process, ...args] = command.split(" "); |
| 12 | |
| 13 | spawn(process, args, { stdio: "inherit" }).once("close", exitCode => |
| 14 | exitCode === 0 ? resolve() : reject(exitCode) |
| 15 | ); |
| 16 | }); |
| 17 | |
| 18 | const [answers, packageJson] = await Promise.all([ |
| 19 | inquirer.prompt([ |