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

feat: add onProgress hook #430

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

benallfree
Copy link
Collaborator

@crutchcorn I'm curious to see what you think of this PR.

It adds an onProgress hook and makes it available to be called from custom action handlers like this:

const myCustomAction =  async (answers, config, plop)=>{
   const { onProgress } = config
   onProgress(`Starting action`)
   return new Promise(resolve=>{
      setTimeout(()=>resolve(`Finished action`),1000)
   }
}

@benallfree benallfree changed the title Add onProgress hook enhancement: add onProgress hook Apr 21, 2024
@benallfree benallfree changed the title enhancement: add onProgress hook feat: add onProgress hook Apr 21, 2024
@benallfree benallfree marked this pull request as draft April 21, 2024 12:27
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.

1 participant