mudassir0909 / jsonresume-theme-elegant

Elegant theme for jsonresume
121 stars 144 forks source link

separate compilation and rendering #106

Closed mudassir0909 closed 5 years ago

mudassir0909 commented 5 years ago

Fixes #105


Before, we were compiling and rendering the template with locals on every theme render. This will separate compilation using pug.compileFile which needs to be run only when the .pug file itself changes(which isn't often).

Now, we just use the compiled template function which can be imported as

https://github.com/mudassir0909/jsonresume-theme-elegant/blob/05c62e748ba4657202a9c0fbeaaf2f558d2dbc97/index.js#L8

from tpl/index.js file that gets generated from a Grunt task.

https://github.com/mudassir0909/jsonresume-theme-elegant/blob/05c62e748ba4657202a9c0fbeaaf2f558d2dbc97/Gruntfile.js#L38-L40


Untitled 2019-10-10 03-11-22