Open crazydeath137 opened 5 years ago
my solution to include raw file is create a new function.
`
functions:[ { name: "include_raw", func: function (path) { var content = 'content'; content = fs.readFileSync('app/'+path).toString(); return content; } } ]
`
and use it `
{{ include_raw('haha.html') }}
`
as I see, Twig has a good function named "source" : https://twig.symfony.com/doc/1.x/functions/source.html But I can't use it in gulp-twig. {{ source(file_path) }} --> all I see is a message like this "Template "file_path" is not defined."
this function is very usefull to me, Tks for ur reading.