Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: CLI for quick scaffolding #277
feat: CLI for quick scaffolding #277
Changes from 3 commits
00de0c0
7a43fb2
23cfe05
9dd55a2
6e79dea
d7211c0
b1fb00d
a787dc0
2b797dc
2712a77
f858276
09496a7
be829d8
20fc29d
a532fe5
f27e2d4
99a4af7
175c8e3
6d1e766
57b0c81
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might have a few prompts for each step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not quite sure what exactly is meant, and Im also not sure I can envision a completely correct
promts
usage scenario on your behalf, so as best I could.By the way, what do you think about splitting the functionality into separate parts, e.g.
Or is it better to leave it as it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use
parse-gitignore
package, as the ignore format is a bit different from globs, the reference here:https://github.com/antfu/eslint-config-flat-gitignore/blob/60240bb3d1dfea0bf48aaa962e18f15f1547b4eb/src/index.ts#L24-L31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't work out for me to use
parse-gitignore
orprompts
with esm, so i can to change the import fromejs
tocjs
inbin/index.js
to../dist/cli/index.cjs
. Or useunbuild
withalias
field. I chose the second option. However, i am not competent in this and do not know how best. My desire to realize exceeds the available knowledge (((There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A prompt would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we won't want to remove all comments. Maybe instead of parsing, we insert the text before the last
}
. Leaving the formating to the ESLint config.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its quite a difficult situation, in the sense that I cant parse it because of the presence of comments and I cant overwrite the fields as such, because I read it as a string line. I tried to do as you said and take into account all the problematic situations, but im not sure that such an implementation is okay 🥴