unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

feat: possibility to render directly to stdout and render cli command #2467

Closed jrutila closed 3 months ago

jrutila commented 4 months ago

๐Ÿ”— Linked issue

2466

โ“ Type of change

๐Ÿ“š Description

Added a new option to nitro.prerender called stdout (default: false). When that option is set, the routes are generated to console output instead of written to files.

Added a new command line tool called render that will render a single given route. It can have an option --stdout and then it will output the route to console.

๐Ÿ“ Checklist

jrutila commented 3 months ago

You can test this feature like this:

jrutila commented 3 months ago

Is there possibility to get this forward? It will fall behind the main, again. Please let me know if something else is needed to get it merged.

pi0 commented 3 months ago

Hi dear @jrutila thanks for your pull request and sorry for late review. I really appreciate it. โค๏ธ

I cannot accept it as-is for some reasons:

For maintenance i am closing this PR (for now) let's keep tracking about the idea via #2466 i definitely love to work on this in the future and i guess same functionality can be implemented outside of nitro source tree to experiment with if you need it.