front-of-house / presta

Minimalist serverless framework for SSR, SSG, serverless APIs and more.
https://presta.run
MIT License
95 stars 6 forks source link

allow actions to be called at runtime #37

Open dictions opened 3 years ago

dictions commented 3 years ago

We should have a way of exposing certain aspects of presta's run time to be called programmatically (e.g. building when files change, busting cache, etc.)

Gatsby is a solid example of this: https://www.gatsbyjs.com/docs/actions

estrattonbailey commented 3 years ago

I think a potentially neat pattern would be to have a util like this.

renderStaticFile(filename, paths[, context])

So imagine a third-party library that watches some .md files for changes. On change, renders that file using the above.