fromdeno / deno2node

Compile your Deno project to run on Node.js.
MIT License
115 stars 3 forks source link

feat: `deno2node --init` #21

Closed wojpawlik closed 2 years ago

wojpawlik commented 2 years ago

Fixes #20, but feel free to open follow-up pull requests.

wojpawlik commented 2 years ago

On 2nd thought, template repo would probably be easier to maintain

KnorpelSenf commented 2 years ago

On 2nd thought, template repo would probably be easier to maintain

Maybe. Either way, good tools focus on being good for the user, not by being good for the developers by needing as little maintenance as possible. Having to clone a template repo (open browser, navigate to GitHub, find template, create repo, copy URL, clone repo) is much worse than doing deno2node --init.

If you are afraid that maintenance becomes a burden, it helps to have a more popular tool, as this increases the chances of other people helping out. In turn, I can offer to take the responsibility for the init files. If someone discovers a problem with the files and submits a fix, I can do the review and hit merge, so that you have as little work as possible :)

wojpawlik commented 2 years ago

That's not it. Imperative code with hardcoded strings is inherently more difficult to understand, modify, and extend, than https://github.com/fromdeno/template.

A CLI that can download and unpack arbitrary tarball could quickly bootstrap a project, perhaps npm has one already?

KnorpelSenf commented 2 years ago

I see no contradiction. Why not provide that functionality behind deno2node --init?

wojpawlik commented 2 years ago

No point if standalone CLI can do it

wojpawlik commented 2 years ago

Also, deno2node is tricky to extend because it runs on both runtimes

wojpawlik commented 2 years ago

And running on Deno is the only means of testing the library

KnorpelSenf commented 2 years ago

Do I understand you correctly that easy project initialisation is out of scope for this tool?

wojpawlik commented 2 years ago

Yes, although if a separate library exists for it, deno2node --init could import it dynamically