xiongwilee / Gracejs

A Nodejs BFF framework, build with koa2(基于koa2的标准前后端分离框架)
https://grace.wilee.me
MIT License
1.39k stars 238 forks source link

Nunjucks自定义选项不起作用 #35

Closed haizhilin2013 closed 7 years ago

haizhilin2013 commented 7 years ago

Nunjucks自定义选项不起作用, 是以下这个文件缺少了配置项引起的

node_modules\grace-consolidate\lib\consolidate.js(1119行)

要将

if (options.settings && options.settings.views) engine.configure(options.settings.views);

修改为:

if (options.settings && options.settings.views) engine.configure(options.settings.views, options.settings.options);

xiongwilee commented 7 years ago

开了个分支完美支持nunjuck,https://github.com/xiongwilee/koa-grace/tree/nunjucks