Comments (1)
Pre-render hooks can actually be invoked at compile-time, because the content itself is a file and doesn't depend on the state (context
and local
).
Post-render hooks are a bit more complicated, because the content isn't file content anymore; it's rendered content. Therefore, it has to happen at render-time. This adds some complexity to the renderer, as it currently writes directly to the output buffer. If post-render hooks are present, the renderer has to pass the content to the hook via the bridge, and then it has to overwrite the previously-rendered content, while also readjusting the buffer size accordingly.
Also, hooks should correspond to a single eryn instance, in order to avoid unwanted hook invocation in other modules. Currently, there is no support for multiple eryn instances (as there is a single, global instance, which isn't ideal).
Since post-render hooks may have a non-negligible impact on the renderer performance, and since multiple eryn instances are not supported yet (but are planned to be), hooks will be introduced in a later release, such as 0.3
or 0.4
.
from eryn.
Related Issues (20)
- SIGSEGV: Compiler output buffer not large enough for loop end jump index
- Add bridge option which makes deep clones of objects instead of shallow clones
- Iterators are not localized inside conditional and void templates
- Loop iterator assignment behavior is unpredictable
- Path relativity is not correctly determined on Windows
- Fix template return type error message
- Replace '\' with '/' regardless of the platform
- Add shared context between components HOT 2
- Conditional stack is not popped for simple conditionals: rare unexpected behavior with conditional templates HOT 2
- Support for async function calls inside Eryn's templates HOT 4
- Add async native functions for compilation and rendering HOT 1
- Very rare SIGSEGV at compile-time and render-time caused by iterator localization HOT 1
- Escape character in combination with component template causes a crash (possible SIGSEGV) HOT 2
- Object expressions inside templates are treated as blocks HOT 1
- Add optional index for arrays in loop templates HOT 2
- Add option to disable automatic local object backup after every iteration HOT 1
- Add break template in loop templates HOT 1
- Eryn fails to build on CentOS HOT 1
- Comment templates use the wrong template end HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eryn.