sade
sade copied to clipboard
Allow to define custom version function
What?
As far as I can see to define CLI version you do this
import sade from 'sade'
const CLI = sade('latitude')
CLI.version('1.2.3')
Then that shows
latitude 1.2.3
It's fine but our CLI install a nodejs server that we call the app. We would like to show both versions. CLI and app versions. Something like this:
So far we manage to hack sade by overriding _version private function
CLI['_version'] = versionCommand
But this is not ideal. I think it would be nice if .version method allows a function
CLI.version(versionCommand)
I'm open to make this change if you consider is a good idea.