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
Apart from 'pretty' and 'basedir' settings that now are available through pugzor configuration options it will be good to add these:
globals: Array Add a list of global names to make accessible in templates.
Can be useful to store constants, may be some common JS code. Yes, now it possible too using code inside pug and/or ViewState.
cache: boolean If set to true, compiled functions are cached. filename must be set as the cache key. Only applies to render functions. Defaults to false.
As you see we do not pass cache so every time pug view is recompiled. Performance leak?
self: boolean
Use a self namespace to hold the locals. It will speed up the compilation, but instead of writing variable you will have to write self.variable to access a property of the locals object. Defaults to false.
Not sure how it works, but also can useful in performance aspect.
What do you think?
The text was updated successfully, but these errors were encountered:
I don't have much knowledge of nodejs when it comes to whether it's possible, but if you know it is and know how to implement it I think it'd be great to have.
Apart from 'pretty' and 'basedir' settings that now are available through pugzor configuration options it will be good to add these:
Can be useful to store constants, may be some common JS code. Yes, now it possible too using code inside pug and/or ViewState.
As you see we do not pass cache so every time pug view is recompiled. Performance leak?
Use a self namespace to hold the locals. It will speed up the compilation, but instead of writing variable you will have to write self.variable to access a property of the locals object. Defaults to false.
Not sure how it works, but also can useful in performance aspect.
What do you think?
The text was updated successfully, but these errors were encountered: