This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const inquirer = require('inquirer'); | |
const { execSync } = require('child_process'); | |
async function main() { | |
try { | |
const answers = await inquirer.prompt([ | |
{ | |
type: 'input', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const {exec} = require('child_process') | |
const inquirer = require('inquirer'); | |
//inspired from https://gist.github.com/zkat/6b453b0bbb2a752aaa9ece702cb5def2 | |
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1))) | |
async function main(argv) { | |
const args = argv.slice(2) |