Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ect template engine #274

Open
daniyel opened this issue Feb 6, 2017 · 0 comments
Open

Problem with ect template engine #274

daniyel opened this issue Feb 6, 2017 · 0 comments

Comments

@daniyel
Copy link

daniyel commented Feb 6, 2017

Hi.

I've started using Sails and I am currently looking and trying different view engines. Currently I am testing ect view engine and there is I think a problem in consolidate.js.

To not repeat myself again, there is already issue on the Sails git that describes what is the problem: https://github.com/balderdashy/sails/issues/3961?_pjax=%23js-repo-pjax-container

Relevant comment:

Hi.

I found out where is the problem. Problem is in consolidate.js. On the line 948 there is var engine = requires.ect; and later it fails on the line 953 engine.configure({ cache: options.cache });, because engine is function. And when I checked ect documentation, you use it like this:

...
var ECT = require('ect');
var ectRenderer = ECT({ watch: true, root: __dirname + '/views', ext: '.ect' });
...

so that means in consolidate.js on the line 948 it should be var engine = requires.ect(); and not var engine = requires.ect;. Then it works.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant