gitevents / gitevents-cli

Command line utility to make configuring and setting up Gitevents easier.
MIT License
2 stars 2 forks source link

pro tips #3

Closed iancrowther closed 8 years ago

iancrowther commented 8 years ago

Generally speaking: If you use heavy libraries the start-up time can be significantly slow. It is good to have at least the -v option to return very quickly. A '-v' (version) option in general is a good idea and never forget good exit codes. The exit code 1 is "okay".

It is however good to have a -y (all yes) or -n (all no) option to automate the input.

And (generally with user input) I find it better to ask "Enter the chapter name: " with an intelligent default value (say: osaka) than to have two questions "There is no chapter name, we evaluated osaka could be good, Y/n" and then ask for the name.

A good logging library in cli tools can help much. With the current tool I use npmlog and I learn to love it.

from @martinheidegger

iancrowther commented 8 years ago

@nnevala this is for you, any q's?

nnevala commented 8 years ago

All good. Great advice, applicability will be determined going forward :)