-
Notifications
You must be signed in to change notification settings - Fork 1
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
generate
v0.0.1
#1
Conversation
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.
Didn't have time to review every line, but the shape of things is good. Good docs, especially on your exported interfaces. 👍
My main questions are about the design:
- Why do I want to put
//deno:generate <command>
in a TypeScript file instead of just indeno task
? - If I have two files that depend on some generated code, which file do I put the annotation in?
Thanks for taking the time to review, @NfNitLoop! I appreciate your feedback. Allow me to address the main questions.
Using Additionally, by utilizing
In situations where multiple files depend on the same generated code, it's highly recommended to create a shared module. This shared module serves as a central location from which both files can import the generated code. By doing so, we promote better code organization and encourage code reuse. The shared module approach also simplifies future modifications and updates. If the generated code needs to be modified or enhanced, we can make the changes in a single place—the shared module—and have the updates reflect in both files that depend on it. This not only reduces code duplication but also improves maintainability by ensuring consistency throughout the project. I hope this clarifies the benefits of using |
Relevant: <#1 (comment)>.
- Add `examples/embedder`. - Move docs example to `examples/docs`. - Fix README.md typos. - Add new FAQ section. - Add sections from denoland/deno#19176: "Use cases", "Conventions", "Examples".
- Add `examples/embedder`. - Move docs example to `examples/docs`. - Fix README.md typos. - Add new FAQ section. - Add sections from denoland/deno#19176: "Use cases", "Conventions", "Examples".
This is a large PR intended to resolve EthanThatOneKid/dengen#1.
It consists of a module (
mod.ts
) and a CLI tool (main.ts
).