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

Expose the pattern engines as a property of the patternlab object #555

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

bleathem
Copy link

@bleathem bleathem commented Nov 8, 2016

When developing a patternlab-node plugin, I found it useful to have access to the loaded pattern engines as a property of the patternlab object. This PR introduces an engines property to the patternlab object.

@bleathem bleathem force-pushed the expose-pattern-engines branch from 128a502 to 039528a Compare November 8, 2016 02:03
Copy link
Member

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geoffp pattern engines are your baby - see anything wrong with this? I am cool

@bleathem
Copy link
Author

bleathem commented Nov 8, 2016

Here's an example of how I consume the patternlab.engine property in my patternlab-node plugin:
https://github.com/bleathem/patternlab-plugin-handlebars-helper-listitems/blob/master/index.js#L13

@bmuenzenmeyer
Copy link
Member

@geoffp poke

@geoffp
Copy link
Contributor

geoffp commented Nov 14, 2016

I have received the poke! I'll check into this.

@geoffp
Copy link
Contributor

geoffp commented Nov 14, 2016

Yeah, I'm cool with it. I had designed the pattern_engines module to be addressable as an array of engines when you require it, just the way I think you want, but being that it's part of patternlab-node, I can see how that would be super awkward from inside a plugin. No harm in hanging another reference on the main PL object.

@bmuenzenmeyer
Copy link
Member

This will be released with next version - thanks!

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.

4 participants