-
Notifications
You must be signed in to change notification settings - Fork 16
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
Continuation of this project #25
Comments
Yes this is possible. For example it can be C# code plus some sort of pre-rendering pug that translates C# code into some callback with id, from other side there is an a dictionary<id, Func> in PugRendering class
Need to investigate if it is possible using NodeServices, but I think it does. From other side Pug is great template/rendering engine I admire how views becomes small, easy to read and elegant. Why not to build own same way as was build Razor engine? |
Well the idea I had is something which is definitely possible, as @ has no special meaning in pug, it will be rendered as entered, thus if you first put the view through the pug renderer and then through the razor renderer, the code will be executed as you would expect. |
does not make sense due we need pre-process pug/razor hybrid and pass a clear pug with callbacks into pugCompile. Only one issue: if it is possible to communicate to C# more than just one final callback. |
the result: no, I see no way to get more than one, final callback using NodeServices(maybe it is possible with Edge.js but this does not metter). Instead of it we can do this other way:
notes: we need cache pre-porcessing(also seems caching of pug is open issue, isn't it?) |
It seems this repo is currently stale and not updated anymore.
Out of personal interest I would love to help maintain and develop this repo.
I think with the inclusion of features such as being able to use C# directly in the code would really make this a viable alternative to cshtml razor views, something I think is definitely doable and asp.net developers who also love pug would definitely love to use.
The text was updated successfully, but these errors were encountered: