Skip to content
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

Pass through namespaces option #24

Merged
merged 1 commit into from
Oct 27, 2016
Merged

Pass through namespaces option #24

merged 1 commit into from
Oct 27, 2016

Conversation

dennisreimann
Copy link
Contributor

@gravypower
Copy link

+1 to this

@jameschetwood
Copy link

@zimmen Any progress / thoughts on this? Thanks

@linnett
Copy link

linnett commented Apr 6, 2016

@zimmen I'm with James here - could this be approved please? We really need to use this feature in production and it would be most helpful! Thanks

@simon-dt
Copy link
Owner

simon-dt commented Apr 6, 2016

Sure, i'll get on it this evening.

Op 6 apr. 2016 om 14:57 heeft Samuel Linnett notifications@github.com het volgende geschreven:

@zimmen I'm with James here - could this be approved please? We really need to use this feature in production and it would be most helpful! Thanks


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@linnett
Copy link

linnett commented Apr 6, 2016

@zimmen that's great - thank you!

@jameschetwood
Copy link

@zimmen @dennisreimann Thanks a lot! Some documentation would also be great. Ive manually applied the commit while I wait but I can see where to set the namespace.

@simon-dt
Copy link
Owner

simon-dt commented Apr 6, 2016

I'll have to look into this myself first. As i'm not using the namespaces myself at the moment.

Op 6 apr. 2016 om 16:14 heeft jameschetwood notifications@github.com het volgende geschreven:

@zimmen Thanks a lot! Some documentation would also be great. Ive manually applied the commit while I wait but I can see where to set the namespace.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@linnett
Copy link

linnett commented Apr 12, 2016

@zimmen hi - did you manage to take a look at this one? thanks

@linnett
Copy link

linnett commented Apr 19, 2016

@dennisreimann how did you set namespaces in your gulp task?

@dennisreimann
Copy link
Contributor Author

@linnett just like the other options:

.pipe(twig({
    namespaces: {
        a: 'a',
        b: 'b'
    }
}))

@linnett
Copy link

linnett commented Apr 19, 2016

@dennisreimann thanks - will give it a try

@jameschetwood
Copy link

@dennisreimann Did you have this working? Ive manually applied your path and tried the following (and a few syntax variations) but I cant get it working:

Old path:

{% include "../button/button.twig" %}

New settings and path:

.pipe(plugins.twig({
  namespaces: {
    app: '../button/'
},
{% include "@App/button.twig" %}

@linnett
Copy link

linnett commented May 23, 2016

@zimmen do you know when this will be included and documented?

@LoicGoyet
Copy link

I do not make it work either :(. My options into the gulp tasks are :

.pipe(twig({
  namespaces: {
    styleguide: 'src/templates/ts-components'
  }
}))

And then I tried several synthax for an include of the file src/templates/ts-components/section-header.twig into the template src/templates/molecules/callout.twig.

Like into symfony projects :
{% include '@styleguide/section-header.twig' %}
Like documented into the twig.js wiki :
{% include 'styleguide::section-header.twig' %}

I also tried into the config to setup the styleguide namespace as relative or absolute.

None of thoses tries worked, any ideas ? Thanks a lot

@LoicGoyet
Copy link

any updates ? :(

@Floppery
Copy link

Floppery commented Oct 26, 2016

Where need options! Please merge this commit!!!

@simon-dt simon-dt merged commit da3f33a into simon-dt:master Oct 27, 2016
@simon-dt
Copy link
Owner

Merged. Along with another PR.

@linnett
Copy link

linnett commented Oct 27, 2016

Can we have the documentation updated for this please?

@simon-dt
Copy link
Owner

It is basically passing it along to twig.js itself. See https://github.com/twigjs/twig.js/wiki#namespaces

I'll put that snippet in the docs as well

@linnett
Copy link

linnett commented Oct 27, 2016

Thanks - we'll give it a go

On 27 Oct 2016 10:34 am, "Simon" notifications@github.com wrote:

It is basically passing it along to twig.js itself. See
https://github.com/twigjs/twig.js/wiki#namespaces

I'll put that snippet in the docs as well


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#24 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACI_wbN9MIBJWCsA2ZaLDx35qBwrrvrxks5q4HAkgaJpZM4HWfSI
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants