-
-
Notifications
You must be signed in to change notification settings - Fork 621
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
[Discussion] Recommend using async/await for prompting #836
Comments
👍 for this, would lead to much cleaner code. |
We still support node 6, we can't remove them.
The title says |
I meant to migrate |
Also, as we are using TS, we don't need to worry as TSC will polyfill based on our target while compilation. |
Sounds good so! |
Picking addon generator if it's cool 🤚 |
If it's ok I can include this change into the refactor of the init generator I'm currently working on :) |
Sure, let me make a checklist of all the generators, when on laptop, and lets collaborate 🤓 |
I'm working on the remove generator. 😁 😅 |
Just a heads up to prevent extra work, add is done here - #843 😄 |
I think @anshumanv is talking about the add generator :) |
Have updated the issue with who is on what✔ |
@rishabh3112 @ematipico @misterdev I would love to give it a try in-order to refactor packages/serve. Let me know if it is within the scope here. |
Yes it is, feel free to send a PR 🙂 |
This would be great and we can refactor to use that. Reason for not having it in the first place was to support legacy node version, but minimal supported now is v.8 and it was introduced in 7.6, so go ahead |
Init generator is probably most important to use this first with, then add |
Anything missing here @rishabh3112 ? |
Yes, opened to flag existing scaffold developers to use async/await for thiers scaffolds too. Even though this can be opened in individual repos but I think having things centralized in the first iteration would be better. |
This is mostly on us, if we implement async await in our generators, that will fix the issue. Is that done? I think we've implemented that already |
Yup |
Do you want to request a feature or report a bug?
Discussion
What is the current behavior?
Currently, we are writing promise chains for prompting, which reduces readability as we nest deeper and deeper.
If the current behavior is a bug, please provide the steps to reproduce.
N/A
What is the expected behavior?
Using async/await for prompting. Example:
https://github.com/rishabh3112/webpack-scaffold-starter/blob/78889a176932ab2c5dadfb2c1d3946cc813bfda5/index.js#L57-L63
If this is a feature request, what is motivation or use case for changing the behavior?
N/A
Please paste the results of
webpack-cli info
here, and mention other relevant information such as programming language.N/A
If it looks fine to all, I would PR for migrating generators in
webpack-cli
,webpack-scaffold-pwa
andwebpack-scaffold-vue
List of generators to be migrated
add-generator
: @rishabh3112 chore: fix and refactor add generator #843addon-generator
: @anshumanv chore: addon generator to async/await #849init-generator
: @misterdev misc(init-generator) cli improvements & refactor #817loader-generator
: -plugin-generator
: -Not needed now ;)remove-generator
: @dhruvdutt (?)update-generator
: -webpack-scaffold-pwa
: -webpack-scaffold-vue
: @misterdev (?)The text was updated successfully, but these errors were encountered: