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

Implements runExit #118

Merged
merged 3 commits into from
Feb 9, 2022
Merged

Implements runExit #118

merged 3 commits into from
Feb 9, 2022

Conversation

arcanis
Copy link
Owner

@arcanis arcanis commented Feb 8, 2022

Clipanion is currently a little annoying to use with single-command scripts because of its boilerplate. The new runExit API lets you write small CLIs even more easily:

import {Command, runExit} from 'clipanion';

runExit(class extends Command {
  async execute() {
    // ...
  }
});

@merceyz
Copy link
Contributor

merceyz commented Feb 8, 2022

Helpers like this should probably not be attached to the Cli class so they can be tree shaken when not in use.

@arcanis
Copy link
Owner Author

arcanis commented Feb 8, 2022

But it's nice for readability 😢

@arcanis arcanis changed the title Implements Cli.runExit Implements runExit Feb 9, 2022
@arcanis arcanis merged commit 89302b4 into master Feb 9, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants