-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Pug support #10
Comments
You would probably just need to create a plugin like the Eta one. For Deno compatibility you could just use a CDN like esm.sh. |
Yes, if we are able to run Pug in Deno, it would be easy to create a plugin for lume, as we have for Eta, nunjucks or jsx. I don't think automatic conversion with esm.sh is possible here, because these conversions don't work when we have to use the filesystem (for example to handle includes https://pugjs.org/language/includes.html) and seems like Pug don't have plans to support Deno yet (according with pugjs/pug#3255). One solution is creating a fork (as we have done with denjucks/nunjucks). |
Yeah, forking Pug seems the most feasible approach for this in the near future. Wish I had the bandwidth to take on something like that. Should any others, many +1s for your efforts. I'll be the first to start your repo :) |
@yet-another-dev I've created this work in progress repository with the code of Pug: https://github.com/lumeland/pug There are still some few dependencies that need to be changed (those that are imported with CJS like this) If anyone want to help me with this, I'd could create then a plugin include Pug support for Lume. |
@oscarotero esm.sh does automatically fill in Node specific libraries with the deno std node compatability library. It may be a little hard to look at but the pug build is importing the result of |
@shadowtime2000 Wow, I didn't know esm.sh could do that (I've assumed that it was something similar to jspm. I just added support for pug and seems to work fine (71e0cf1), so no need to create and maintain a fork. @yet-another-dev In the next version there will be a plugin to activate it. |
from jspm/project#50 (comment) it looks like jspm is currently adding this as well. |
does that mean you can use nunjucks directly as well, rather than the denjucks fork? |
but it's only for those functions covered by Deno's Node compatibility layer, right? So it doesn't include for example net? A pity, as I use an API with my smart home software that I would prefer to run under Deno :-( |
We should probably add a note for the plugins that says that it may be better to use template engines with native Deno support because those will probably have better support and stuff with errors and other problems. |
v0.10.0 released including the Pug plugin |
Would love to test out and use lume, but not without it supporting Pug (the thought of writing actual HTML after using Pug makes me shiver).
Is this currently possible?
The text was updated successfully, but these errors were encountered: