11<?php
22
33/*!
4- * Pattern Lab Builder Class - v0.7.6
4+ * Pattern Lab Builder Class - v0.7.7
55 *
66 * Copyright (c) 2013-2014 Dave Olsen, http://dmolsen.com
77 * Licensed under the MIT license
@@ -50,6 +50,7 @@ class Builder {
5050 protected $ mainPageFoot ; // the footer to be included on main pages
5151 protected $ addPatternHF ; // should the pattern header and footer be added
5252 protected $ cleanPublic ; // whether the public directory should be cleaned out or not on generate
53+ protected $ styleGuideExcludes ;// which pattern types to exclude from the style guide
5354
5455 /**
5556 * When initializing the Builder class or the sub-classes make sure the base properties are configured
@@ -67,7 +68,8 @@ public function __construct($config = array()) {
6768 foreach ($ config as $ key => $ value ) {
6869
6970 // if the variables are array-like make sure the properties are validated/trimmed/lowercased before saving
70- if (($ key == "ie " ) || ($ key == "id " ) || ($ key == "patternStates " )) {
71+ $ arrayKeys = array ("ie " ,"id " ,"patternStates " ,"styleGuideExcludes " );
72+ if (in_array ($ key ,$ arrayKeys )) {
7173 $ values = explode (", " ,$ value );
7274 array_walk ($ values ,'PatternLab\Builder::trim ' );
7375 $ this ->$ key = $ values ;
@@ -886,7 +888,7 @@ protected function gatherPatternInfo() {
886888 $ patternTypeDash = $ patternTypeValues ["patternTypeDash " ];
887889
888890 // if this has a second level of patterns check them out (means we don't process pages & templates)
889- if (isset ($ patternTypeValues ["patternTypeItems " ])) {
891+ if (isset ($ patternTypeValues ["patternTypeItems " ]) && (! in_array ( $ patternType , $ this -> styleGuideExcludes )) ) {
890892
891893 $ arrayReset = false ;
892894
0 commit comments