Closed qjhart closed 8 years ago
I have started a folder where you can register the commands 'Commander' definition: https://github.com/ucd-cws/calvin-network-tools/tree/matrix/nodejs/cmds/register (make sure to include the new module in index.js as well).
@qjhart to answer your questions above. 1) I think it's because the files have #! at the top, so the idea is you call a module and exit. That's just a guess, I'm copying a design pattern I have seen online. 2) Check out the new setup. /nodejs/index.js now registers commands, then the onReady() function is executed. You can set global options in that root /nodejs/index.js file. I have also created a /nodejs/cmds/register/shared.js module which has the shared options for 'build', 'show-build', 'run', 'update'.
Added some beginner code for cmd-line at https://github.com/ucd-cws/calvin-network-tools/blob/matrix/bin/cnf-matrix#L6 and https://github.com/ucd-cws/calvin-network-tools/blob/matrix/bin/cnf#L14
Although commander wasn't working as expected, so neither are right. Had a few questions: