Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define custom version function #58

Open
andresgutgon opened this issue Jun 3, 2024 · 0 comments
Open

Allow to define custom version function #58

andresgutgon opened this issue Jun 3, 2024 · 0 comments

Comments

@andresgutgon
Copy link

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:
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant