mintuz / BB8-Commander

A Node CLI Tool for the Sphero BB8 Robot every loves.
MIT License
71 stars 17 forks source link

best practice to install a new npm package for BB8 commander #30

Closed JBX028 closed 8 years ago

JBX028 commented 8 years ago

Hi,

I want to create a new BB8 commander script that will take a text on input and will translate the message in morse mode by blinking. To do that, I need to install into /usr/local/lib/node_modules/bb8-commander/node_modules package named morse (https://www.npmjs.com/package/morse)

Unfortunately, probably because of permission issues I am not able to install this package with a simple npm install morse --save into this directory.

Question is, how to install a new package required for a new command? I can probably change the permissions or find another workaround but I am sure there is a proper way to do that and facilitate the creation of new scripts.

Thanks!

Regards,

mintuz commented 8 years ago

Hello this isn't really an issue to-do with BB8-Commander but more to-do with the way you are trying to create a new script.

If you wish to develop a new script, I suggest git cloning the repo and adding a script within the folder that is pulled down then test it with node bin/index.js <COMMAND_NAME>

Another option is to not clone it and instead create your own project that injects new scripts using the instructions set here. https://github.com/mintuz/BB8-Commander#using-bb8-commander-in-your-own-projects

Going to close issue as there is no action required.

JBX028 commented 8 years ago

Thanks for your quick reply. I will indeed clone the repo and test my script from this location. Regards,