Closed iGitScor closed 9 years ago
That's because, the trans() function its a Symfony2 extension over Twig... you can see all the Twig.js supported functionality at https://github.com/justjohn/twig.js/wiki/Implementation-Notes
By the way... in your code, if you change the "filters" key, by "functions", it could work.
I know trans is a Symfony2 extension.
Even if I change trans as a function, I get the same mesage (Unable to find filter trans
)
What version are you using in your package.json?, there is no tag for the "filters" support... so you have to use:
"gulp-twig": "*"
Another thing... the $.twig var is equals to: require('gulp-twig') I suppose.
In my package.json : "gulp-twig": "^0.3.0"
Yes, $.twig = require('gulp-twig')
That's because of the tag in the repo or in npm... maybe @zimmen can handle this.
Hi @iGitScor , You can update the package.json to "gulp-twig":"^0.4.0"
( or "gulp-twig":"*"
although this could bring in breaking changes some day )
Thanks for the heads-up @mowcixo
With this changes it has to work @iGitScor. Thanks @zimmen.
Yes, it works ! Thanks
I'm having an issue with using filter and compiling my twig.
I got the follwoing error :
The problem is here :
Here my gulp task :
I'm trying to reproduce Symfony2 behavior