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
we need cleaner logic for auto-detecting the engine to use.
Hmm, maybe it's as simple as this:
use the built-in default - engine-lodash - when no engine is defined by the user.
if template.option('view engine', 'foo') is defined, use that as the default.
use a .pickEngine() method to resolve the engine based on engine options, template params, etc.
expose .pickEngine() on the options so it can be overridden by implementors/users.
template.option('pickEngine',function(env){// env can be an object with template, options, locals, method details// do stuff and return an engine name});
Exposing the option to use a custom .pickEngine() function allows us to implement simpler, more opinionated logic.
we need cleaner logic for auto-detecting the engine to use.
Hmm, maybe it's as simple as this:
template.option('view engine', 'foo')
is defined, use that as the default..pickEngine()
method to resolve the engine based on engine options, template params, etc..pickEngine()
on the options so it can be overridden by implementors/users.Exposing the option to use a custom
.pickEngine()
function allows us to implement simpler, more opinionated logic.thoughts @doowb?
The text was updated successfully, but these errors were encountered: