Skip to content

Instantly share code, notes, and snippets.

@chrisgfortes
Created July 16, 2020 00:44
Show Gist options
  • Save chrisgfortes/6df0364995e79c85f216cb7613e81dfa to your computer and use it in GitHub Desktop.
Save chrisgfortes/6df0364995e79c85f216cb7613e81dfa to your computer and use it in GitHub Desktop.
Creating lib as command line

Run: yarn link or npm link Run: my-lib ...args in terminal

// command line args
const args = process.argv
{
"name": "bash-terminal",
"main": "index.js",
"bin": {
"my-lib": "./bin/index.js"
},
"dependencies": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment