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

Config access for pattern engines #646

Merged
merged 1 commit into from
Apr 5, 2017

Conversation

geoffp
Copy link
Contributor

@geoffp geoffp commented Apr 4, 2017

This is the simplest and least disruptive way I can think of to make engines configurable. If supported by each engine, call a function that injects the global pattern lab config into the closure scope of the engine so that engines can make configurable decisions.

@bramsmulders and I are thinking this is necessary to be able to configure the React engine -- the first use case being the ability to shut off client-side code generation if you don't need interactive components and / or are just using React components to make a static style guide. There should be some build speed benefit to doing that.

This might also benefit the Handlebars engine, I seem to remember that it has some things you can configure.

See pattern-lab/patternengine-node-mustache#8 for the Mustache implementation.

pattern lab config into the closure scope of the engine so that
engines can be configured.
@coveralls
Copy link

coveralls commented Apr 4, 2017

Coverage Status

Coverage decreased (-0.03%) to 63.761% when pulling 15f89eb on config-access-for-engines into 15c456c on dev-3.0.

@bmuenzenmeyer
Copy link
Member

I love this, the reference PR pattern-lab/patternengine-node-mustache#8 (which I might close rather than accept) and greatly appreciate the work.

@bmuenzenmeyer bmuenzenmeyer merged commit 4eff3f2 into dev-3.0 Apr 5, 2017
@bmuenzenmeyer bmuenzenmeyer deleted the config-access-for-engines branch April 5, 2017 12:18
@bmuenzenmeyer bmuenzenmeyer removed their assignment Apr 5, 2017
@bmuenzenmeyer bmuenzenmeyer removed their request for review April 5, 2017 12:18
@bramsmulders
Copy link

Whoop!

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