You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use vash to render cshtml files. I'm having decent luck after extending the helpers as needed but I'm stuck on rendering the @Helper () { } methods in my razor files.
Is there a not-so-painful way to create another @{namespace} like @html that acts as like razor's @Helper?
I know this isn't vash's intended use but, since I'm pretty close to pulling it off, I figured I'd ask if this was possible.
The text was updated successfully, but these errors were encountered:
It's currently not possible to have multiple internal namespaces for a template, since that is defined all the way from the config, through the compiler, and even in the runtime / linker. But you could hack this with some sort of globals, I suppose. But that sounds pretty hacky.
You might be better off preprocessing your cshtml files with a regex that replaces the @helper keyword with an assignment to a global namespace?
I'm trying to use vash to render cshtml files. I'm having decent luck after extending the helpers as needed but I'm stuck on rendering the @Helper () { } methods in my razor files.
Is there a not-so-painful way to create another @{namespace} like @html that acts as like razor's @Helper?
I know this isn't vash's intended use but, since I'm pretty close to pulling it off, I figured I'd ask if this was possible.
The text was updated successfully, but these errors were encountered: