-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing filepath to the Pug compiler to allow using relative paths #9
Conversation
@weotch Thanks. Could you also tag changes? |
Was just looking into this for you and I noticed this commit:
|
@weotch So for now:
|
In pug-symfony, I set the basedir and pass the file path and resolve paths from each possible path (bundles in Symfony), so both relative and absolute always works. There is no reason it would not be possible to do the same. Your both implementations seems to solve all problem with that. But as far as I understand, there is no longer any laravel-pug specificity for extending layouts. It should works as in pug and so you could just add a reference to pug-js documentation. |
@kylekatarnls but my PR doing exactly the same. Before only basedir was specified, path was not passed. |
@vitalybaev Does 1dac714 look accurate to you? |
@vitalybaev Yes the coding work seems done to me and well done. @weotch Better but still a bit confusing:
No you must not. As a user the basedir is set for you and the resources/views default is relevant for most users. You don't need to change it, best practice would even be to keep it as a standard. But you can say something like:
|
This is what I would say to explain: #10 feel free to take or adapt. |
@weotch Yes, looks good! |
@weotch @kylekatarnls Tell me guys one question: should this call be also pass $path? https://github.com/BKWLD/laravel-pug/blob/master/src/PugBladeCompiler.php#L44 |
It makes sense to me that it should. I'll do that now. |
@weotch Good job! Thanks for the package. The only thing is publishing release for using it with composer semver. |
Cool! Released now as 1.2.0 |
@weotch @kylekatarnls I took a look with fresh mind and realised that I misunderstood you yeasterday: I've completely removed |
Using leading slash to using Jade's extend breaks code completion in IDE's.
But we could simply pass filepath to the Pug compiler, and get opportunity to write relative paths.