commander_snippetsThis is for the VSCode to easily make use of commander.js easy. #Overview In order to use commander.js you create a "program" that excepts commandline args and functions. ReligionI don't like to use ; and I like to use 3 spaces for indent. Installation
UsageType snippet prefix, and IntelliSense will show the snippet. If IntelliSense doesn't show the snippet, press Ctrl+Space and then Enter to insert the snippet. The SnippetsSo, I like it when I can do things fast :) ... So, if you use the snippets, and you need to change stuff use the TAB and not the enter cause it will move so you will fill in each of the items you need. Try it. snippetCommanderRequirerThis snippet will create the three require for:
Number of Tabstops: 0 Why these? Well in almost all cases I use commander.js to create commandline tools, as such, I like to use prompt to get info, from the user if they haven't given me the expected valid input ... so I almost always use it. Also, it is easy to delete prompt and colors :) snippetCommanderVersionThis creates the version and options for the command you are making.
Number of Tabstops: 4 snippetCommanderActionThis will create the commander.js action
Number of Tabstops: 3 snippetCommanderErrorThis will create the custom error function for your command.
I gave this one as a simple example one cause I hate trying to remember all the Usage, Commands, and Options values. Again, as before I just delete it when I don't want it. Number of Tabstops: 0 snippetCommanderHelpThis will create the custom help function for your command.
Number of Tabstops: 0 snippetCommanderOptionThis will create just the one option value for your command.
Number of Tabstops: 3 |