Skip to content

Instantly share code, notes, and snippets.

@zkat
Forked from junosuarez/index.js
Created June 29, 2017 00:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkat/6b453b0bbb2a752aaa9ece702cb5def2 to your computer and use it in GitHub Desktop.
Save zkat/6b453b0bbb2a752aaa9ece702cb5def2 to your computer and use it in GitHub Desktop.
async cli app boilerplate
#!/usr/bin/env node
if (process.mainModule === module) setImmediate(() => main(process.argv).catch(e => console.log(e.stack) && process.exit(1)))
async function main(argv) {
console.log(argv.slice(2))
}
{"name":"boilerplate", "version":"0.0.0", "bin": "index.js"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment