Closed jaydenseric closed 8 years ago
The best source for the compiler options is probably the compiler constructor DocBlock (Sorry, haha). I'm open for any documentation help.
https://github.com/Talesoft/tale-jade/blob/master/Compiler.php#L210
You need to pass this as a compiler option (The compiler needs it, not the renderer)
You can do it like this:
$renderer = new Tale\Jade\Renderer([
'compiler_options' => [
'replace_mixins' => true
]
]);
I didn't forward all options, I'm thinking about a cooler config approach currently.
Thanks, that works. I did eventually try that, but I had a separate error that threw me off. Thanks for the explanation!
Can this be made true by default? Silently replacing duplicate mixins is how Pug works, it would be better for Tale Jade users to opt-out rather than opt-in.
Well, I'm a great fan of stability and whenever I see things duplicated, my DRY-sensors activate and I assume it happened on accident.
I will think about this and keep this thread updated :)
I have been attempting to get the
replaceMixins
option to work like so:But I still get:
exception 'Tale\Jade\Compiler\Exception' with message 'Failed to compile Jade: Duplicate mixin name blockquote
...I have toggled the versions of the file on Github and have seen the options have been renamed from camel-case, but I have tried both to no success for the current version that installs via Composer.
Am I configuring it wrongly? I can't find documentation for configuration beyond the basics mentioned in the readme.