metalsmith / layouts

A metalsmith plugin for layouts
MIT License
116 stars 49 forks source link

Not working with ECT templates after upgrading from 1.8.1 #165

Closed SteveMcArthur closed 5 years ago

SteveMcArthur commented 5 years ago

I tried to move from 1.8.1 of the plugin to 2.2.0 and my existing projects using ECT templates broke. Created a bare bones simple project and still had the same problems. Consistently get the same error message: Cannot read property 'ect' of undefined in page on line

Installed jstransformer-ect.

Is this me or is this a bug? Thanks

ismay commented 5 years ago

It is a breaking change, so there is a chance that existing projects using v1 will break if you move them to v2. Please check out the readme for the current api.

If you need help try our slack channel.

SteveMcArthur commented 5 years ago

I actually downloaded the following project https://github.com/wernerglinka/ms-layout-njk which works fine with nunjucks. I tried swapping out nunjucks for ect (did all the necessary template changes and installed jstransformer-ect) and immediately got the property 'ect' error. I trawled through the api docs, so unless I've missed something obvious or someone else has got ect to work, then I think this is a bug - possibly with jstransformer rather than this package.

ismay commented 5 years ago

Depends. All tests are passing. So there’s not really a reason to assume there’s something wrong. If you still think so please open a pr with a failing test and then we can debug it.