Closed bekos closed 8 years ago
Not sure to fully understand. Where exactly do you need the full path? There's an example of jade compilation here https://github.com/ludohenin/gulp-inline-ng2-template/blob/master/test/test.js#L70-L72
In order to be able to use extends
or include
into a jade file, you have to also specify the filename
on the render
function. That;s when the absolute file path is required, and not just the contents.
Check this PR on how I plan to do it now. https://github.com/ng-lightning/ng-lightning/pull/125
I hope it's clear now :-) Great project btw 👍
yes it's clear now :-) The thing is that I have to make a breaking change to support this and I'm not sure I want to that. If you have an idea, feel free to sent a PR
It does not have to be a breaking change. It can be an extra 4th parameter or another property of the 1st argument (ext in the examples).
A 4th parameter doesn't look that pretty and the first 2 are strings so if I change them it'll break things. I think I'll break it and make only 2 args:
I think 1st argument is an object but I will check again. Thanks for your response.
For var ext
on https://github.com/ludohenin/gulp-inline-ng2-template/blob/master/parser.js#L224 I believe you can do ext.absPath = absolute_path;
if you don't want to introduce a breaking change.
This is there, v3.0.0
@ludohenin Cool. Thx 👍
When using relative paths it's difficult to get the absolute path of the rendered file. This is needed when for example we want to set the
filename
into the jade compiler.