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

Option of excluding sub pattern types from the styleguide #626

Merged
merged 5 commits into from
Feb 23, 2017

Conversation

AndrewLeedham
Copy link
Contributor

Addresses: Option of excluding sub pattern types from the styleguide

Summary of changes:

  • Replicated omitPatternType for 'patternType/patternSubtype'
  • Duplicated typePatterns as styleguideTypePatterns to seperate stylguide and nav menu creation.

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.

hey @AndrewLeedham

a surprise but welcome addition! I will try to review this in earnest next chance I get. Can you include a usage example, which Itake it is an additional snippet within patternlab-config.json

});
if (omitPatternType) {
if (patternlab.config.debug) {
console.log('Omitting ' + patternType + '/' + patternSubtype + ' from building a viewall page because its patternGroup is specified in styleguideExcludes.');
Copy link
Member

Choose a reason for hiding this comment

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

Should this be pattern subGroup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're not wrong, must of missed that, I'll commit the change now

Changed 'patternGroup' to 'patternSubGroup'
@AndrewLeedham
Copy link
Contributor Author

@bmuenzenmeyer Thanks for the feedback and quick reply. With regards to usage examples, what do you mean by a snippet? The intention is that sub-types can be specified within the already existing 'styleGuideExcludes' array with the syntax "patternType/subPatternType". Since sub-types are user defined, adding this to the default patternlab-config.json wouldn't make all too much sense.

@bmuenzenmeyer
Copy link
Member

By snippet I meant how would one exclude a subtype.

...
"styleguideExcludes" : ["atoms/global"]
...

would do the trick if I understand correctly

@AndrewLeedham
Copy link
Contributor Author

@bmuenzenmeyer Sorry I worded that pretty badly. I meant where do you want me to include the snippet? in the default patternlab-config.json?

@bmuenzenmeyer
Copy link
Member

just here, so I can make sure to mention it in the release notes or wiki
if i have that syntax as you'd expect, we are all good 🚀

@AndrewLeedham
Copy link
Contributor Author

@bmuenzenmeyer Ah okay fair enough. Yeah you have it right.

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.

looks good - and helped me realize that the patternlab-config.json styleguideExcludes should be styleGuideExcludes

created #627

@bmuenzenmeyer bmuenzenmeyer merged commit 6cdc540 into pattern-lab:dev Feb 23, 2017
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.

2 participants