- Install node
- Run
npm install -g shaq
in your terminal
Run shaq hello
in your terminal, or shaq --help
to see what's up
- First, make sure you have node and git installed.
- Configure git with your github credentials: see https://help.github.com/articles/set-up-git
- Fork this repository by pressing the Fork button .
- Clone the repository by running
git clone git@github.com:k88hudson/shaq.git
in your terminal, replacingk88hudson
with your own username. - Also in your terminal, cd into the shaq directory:
cd shaq
- Install dependencies:
npm install
- Make the main shaq.js file executable:
chmod +x lib/shaq.js
- Now you can run
lib/shaq.js
to test shaq locally.
Add a function to lib/skillz.js
. It might look something like this:
function rap() {
console.log( shaqsHead + 'I can rap 123' );
}
The text inside console.log
should be a string - it will get printed out in the console. You can use the variable shaqsHead
to add a cool head at the start of your string.
Next, you should add your command to lib/shaq.js
in the list of options:
program
.option('rap', 'Make shaq rap')
Now, test it out with lib/shaq.js
!