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

Add the ability to send a promise as an option to spinnies #3

Open
jbcarpanelli opened this issue Jun 4, 2019 · 0 comments
Open

Add the ability to send a promise as an option to spinnies #3

jbcarpanelli opened this issue Jun 4, 2019 · 0 comments
Labels
feature New feature or request good first issue Good for newcomers

Comments

@jbcarpanelli
Copy link
Owner

Instead of setting a spinner as succeed/fail using the spinners#fail and spinner#succeed methods, it would be great if spinnies could do this automatically when sending a promise as an option:

spinnies.add('spinner-1', { 
  text: 'Doing X..',
  onPromise: {
    promise: someFunction(arg1, arg2), 
    succeed: { 
      text: 'X succeeded',
      color: 'greenBright'
    },
    fail: {
      ...
    } 
});
@jbcarpanelli jbcarpanelli added feature New feature or request good first issue Good for newcomers labels Jun 4, 2019
@jbcarpanelli jbcarpanelli changed the title Add the ability to send a promise as option to a spinner Add the ability to send a promise as an option to spinnies Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant