-
Notifications
You must be signed in to change notification settings - Fork 28
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
Expose the template generator via a REST api #80
base: main
Are you sure you want to change the base?
Conversation
canvas: { | ||
create(width, height) { | ||
// Not implemented in Cloudflare Workers | ||
throw new Error("Not implemented") |
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.
Could probably reuse the one from the CLI.
It seems that cloudflare workers dont allow the use of It does also present an intresting attack vector for this if we do self host this. |
I think it's possible to use Vite to precompile the eval into string templates. |
Ohh intresting, thanks. It seems it uses ETA.compileToString to generate the code usually consumed via eval. Doing this at build would likely be a benefit everywhere this is ran. |
Well, I tried it, doesn't seem to be working. Still spits out |
Eta v3's compile seems to guard the |
Thanks, I have cherry-picked this into my branch. Ill continune from here :) |
@@ -1,4 +1,5 @@ | |||
{ | |||
"remoteUser": "node", |
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.
For clarity, I changed the Dev Container to use the node
user instead of root
as it messes with the file permission on Linux host.
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.
Ah, I thought it was to solve the warning that jekyll prints :) Solved 2 things at once 👍
Co-authored-by: deirn <[email protected]>
No description provided.