Skip to content

[Feature] Inline Includes#15

Open
d-simon wants to merge 6 commits intosimon-dt:masterfrom
d-simon:feature/inline-includes
Open

[Feature] Inline Includes#15
d-simon wants to merge 6 commits intosimon-dt:masterfrom
d-simon:feature/inline-includes

Conversation

@d-simon
Copy link

@d-simon d-simon commented Sep 1, 2015

I needed this to prepend an include when generating the styleguide over here.
For this I integrated inline includes as implemented in a different gulp-twig implementation.

A noteworthy change is line 78 in index.js. Instead of passing a file path, the plugin now passes the file.contents as string to Twig. This was necessary for my use case. Is there any downside to this?

Secondly, I introduced three dependenies (lodash.merge, lodash.isarray and glob).

And lastly, I have not written any tests for this. Though the current ones are passing.

What are your thoughts on this? :-)

Important: Not ready to merge!
To make this work, I had to disable the cache of Twig, which has a very subtle bug with the id of templates (I will open a PR and cross-reference it here).
=> Before anything the bugfix will first have to be approved and make it into a release of Twig.js.

@olets
Copy link
Collaborator

olets commented May 10, 2017

I notice you're working off a significantly outdated version of twig.js. Was there a reason you chose backflip's fork? At the time of his work, the only difference was a small change to ID validation. Have you tried using gulp-twig with the latest twig.js, for example via

https://github.com/olets/gulp-twig#update-dependencies

? (see also #32)

@olets olets added the stale label Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants