shibori 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +27 -0
  5. data/Procfile +1 -0
  6. data/README.md +24 -0
  7. data/Rakefile +2 -0
  8. data/app.json +11 -0
  9. data/builder/lineage_hunter.js +80 -0
  10. data/builder/list_item_hunter.js +106 -0
  11. data/builder/media_hunter.js +51 -0
  12. data/builder/object_factory.js +60 -0
  13. data/builder/parameter_hunter.js +69 -0
  14. data/builder/pattern_assembler.js +258 -0
  15. data/builder/pattern_exporter.js +43 -0
  16. data/builder/patternlab.js +365 -0
  17. data/builder/patternlab_grunt.js +38 -0
  18. data/builder/patternlab_gulp.js +26 -0
  19. data/builder/pseudopattern_hunter.js +78 -0
  20. data/config.json +34 -0
  21. data/docs/Pattern Lab Node.md +225 -0
  22. data/favicon.ico +0 -0
  23. data/gulpfile.js +148 -0
  24. data/index.js +20 -0
  25. data/lib/shibori/version.rb +3 -0
  26. data/lib/shibori.rb +11 -0
  27. data/package.json +44 -0
  28. data/public/data/annotations.js +109 -0
  29. data/public/styleguide/css/static.css +458 -0
  30. data/public/styleguide/css/static.scss +404 -0
  31. data/public/styleguide/css/styleguide-specific.css +170 -0
  32. data/public/styleguide/css/styleguide-specific.scss +204 -0
  33. data/public/styleguide/css/styleguide.css +880 -0
  34. data/public/styleguide/css/styleguide.scss +950 -0
  35. data/public/styleguide/css/vendor/prism.css +112 -0
  36. data/public/styleguide/css/vendor/typeahead.css +66 -0
  37. data/public/styleguide/fonts/icomoon.eot +0 -0
  38. data/public/styleguide/fonts/icomoon.svg +22 -0
  39. data/public/styleguide/fonts/icomoon.ttf +0 -0
  40. data/public/styleguide/fonts/icomoon.woff +0 -0
  41. data/public/styleguide/html/README +1 -0
  42. data/public/styleguide/images/spinner.gif +0 -0
  43. data/public/styleguide/js/annotations-pattern.js +308 -0
  44. data/public/styleguide/js/annotations-viewer.js +289 -0
  45. data/public/styleguide/js/code-pattern.js +120 -0
  46. data/public/styleguide/js/code-viewer.js +443 -0
  47. data/public/styleguide/js/data-saver.js +169 -0
  48. data/public/styleguide/js/pattern-finder.js +114 -0
  49. data/public/styleguide/js/postmessage.js +127 -0
  50. data/public/styleguide/js/styleguide.js +600 -0
  51. data/public/styleguide/js/url-handler.js +182 -0
  52. data/public/styleguide/js/vendor/classlist-polyfill.js +176 -0
  53. data/public/styleguide/js/vendor/jquery.js +4 -0
  54. data/public/styleguide/js/vendor/jwerty.js +523 -0
  55. data/public/styleguide/js/vendor/prism.js +7 -0
  56. data/public/styleguide/js/vendor/typeahead.bundle.min.js +7 -0
  57. data/script/bootstrap +58 -0
  58. data/shibori.gemspec +18 -0
  59. data/shibori.jpg +0 -0
  60. data/source/_data/annotations.js +109 -0
  61. data/source/_data/data.json +93 -0
  62. data/source/_data/listitems.json +782 -0
  63. data/source/_patternlab-files/README +1 -0
  64. data/source/_patternlab-files/index.mustache +94 -0
  65. data/source/_patternlab-files/partials/ishControls.mustache +64 -0
  66. data/source/_patternlab-files/partials/patternNav.mustache +17 -0
  67. data/source/_patternlab-files/partials/patternPaths.mustache +3 -0
  68. data/source/_patternlab-files/partials/viewAllPaths.mustache +3 -0
  69. data/source/_patternlab-files/pattern-header-footer/README +1 -0
  70. data/source/_patternlab-files/pattern-header-footer/footer.html +34 -0
  71. data/source/_patternlab-files/pattern-header-footer/header.html +44 -0
  72. data/source/_patternlab-files/styleguide.mustache +75 -0
  73. data/source/_patternlab-files/viewall.mustache +75 -0
  74. data/source/_patterns/00-atoms/00-typography/00-headings.mustache +6 -0
  75. data/source/_patterns/00-atoms/00-typography/01-headings-options.mustache +7 -0
  76. data/source/_patterns/00-atoms/00-typography/02-body.mustache +2 -0
  77. data/source/_patterns/00-atoms/00-typography/03-text-manipulation.mustache +12 -0
  78. data/source/_patterns/00-atoms/00-typography/04-blockquotes.mustache +3 -0
  79. data/source/_patterns/00-atoms/00-typography/05-lists.mustache +64 -0
  80. data/source/_patterns/00-atoms/01-colors/00-colors-monochromatic.mustache +36 -0
  81. data/source/_patterns/00-atoms/01-colors/01-colors-brand.mustache +26 -0
  82. data/source/_patterns/00-atoms/01-colors/02-colors-gradients.mustache +38 -0
  83. data/source/_patterns/00-atoms/02-buttons/00-btn-lg.mustache +7 -0
  84. data/source/_patterns/00-atoms/02-buttons/01-btn-sm.mustache +7 -0
  85. data/source/_patterns/00-atoms/02-buttons/02-btn-xs.mustache +7 -0
  86. data/source/_patterns/00-atoms/02-buttons/03-btn-block.mustache +7 -0
  87. data/source/_patterns/00-atoms/02-buttons/04-btn-deploy.mustache +4 -0
  88. data/source/_patterns/00-atoms/03-forms/00-text-fields.mustache +24 -0
  89. data/source/_patterns/00-atoms/03-forms/01-select-menu.mustache +6 -0
  90. data/source/_patterns/00-atoms/03-forms/02-checkbox.mustache +10 -0
  91. data/source/_patterns/00-atoms/03-forms/03-radios.mustache +10 -0
  92. data/source/_patterns/00-atoms/03-forms/04-validation.mustache +14 -0
  93. data/source/_patterns/00-atoms/04-quote/00-pullquote.mustache +7 -0
  94. data/source/_patterns/00-atoms/04-quote/01-quote-small.mustache +7 -0
  95. data/source/_patterns/00-atoms/05-code/01-pre.mustache +11 -0
  96. data/source/_patterns/00-atoms/06-tooltips/00-text.mustache +3 -0
  97. data/source/_patterns/00-atoms/06-tooltips/01-diagram-callout.mustache +1 -0
  98. data/source/_patterns/00-atoms/07-loader/00-spinner.mustache +5 -0
  99. data/source/_patterns/00-atoms/08-readmore/00-readmore.mustache +3 -0
  100. data/source/_patterns/00-atoms/09-slider/00-dots.mustache +8 -0
  101. data/source/_patterns/00-atoms/10-tables/00-tables.mustache +26 -0
  102. data/source/_patterns/00-atoms/12-modal/00-modal.mustache +14 -0
  103. data/source/_patterns/00-atoms/13-panel/00-panel.mustache +3 -0
  104. data/source/_patterns/00-atoms/14-users/00-avatar.mustache +3 -0
  105. data/source/_patterns/00-atoms/15-icons/00-icons.mustache +333 -0
  106. data/source/_patterns/00-atoms/15-icons/04-icon-colors.mustache +38 -0
  107. data/source/_patterns/00-atoms/15-icons/05-icon-sizes.mustache +31 -0
  108. data/source/_patterns/00-atoms/15-icons/_02-languages.mustache +0 -0
  109. data/source/_patterns/00-atoms/15-icons/_03-social.mustache +0 -0
  110. data/source/_patterns/00-atoms/15-icons/_05-icon-containers.mustache +0 -0
  111. data/source/_patterns/00-atoms/16-video/01-video.mustache +3 -0
  112. data/source/_patterns/00-atoms/16-video/_00-play-button.mustache +0 -0
  113. data/source/_patterns/00-atoms/17-utilities/00-visibility.mustache +8 -0
  114. data/source/_patterns/00-atoms/17-utilities/01-ui-elements.mustache +3 -0
  115. data/source/_patterns/00-atoms/18-grid/_00-grid.mustache +0 -0
  116. data/source/_patterns/01-molecules/00-text/00-header-groups.mustache +4 -0
  117. data/source/_patterns/01-molecules/00-text/01-intro-text.mustache +5 -0
  118. data/source/_patterns/01-molecules/01-layout/00-one-up.mustache +8 -0
  119. data/source/_patterns/01-molecules/01-layout/01-two-up.mustache +9 -0
  120. data/source/_patterns/01-molecules/01-layout/02-three-up.mustache +10 -0
  121. data/source/_patterns/01-molecules/01-layout/03-four-up.mustache +11 -0
  122. data/source/_patterns/01-molecules/01-layout/04-masonary-2.mustache +24 -0
  123. data/source/_patterns/01-molecules/01-layout/05-masonary-3.mustache +24 -0
  124. data/source/_patterns/01-molecules/02-navigation/01-subnav.mustache +21 -0
  125. data/source/_patterns/01-molecules/02-navigation/02-breadcrumbs.mustache +25 -0
  126. data/source/_patterns/01-molecules/02-navigation/03-side-nav.mustache +11 -0
  127. data/source/_patterns/01-molecules/02-navigation/04-side-nav-small.mustache +32 -0
  128. data/source/_patterns/01-molecules/02-navigation/05-pagination.mustache +0 -0
  129. data/source/_patterns/01-molecules/02-navigation/06-tabs.mustache +46 -0
  130. data/source/_patterns/01-molecules/03-forms/_00-search.mustache +0 -0
  131. data/source/_patterns/01-molecules/04-slider/00-slider.mustache +8 -0
  132. data/source/_patterns/01-molecules/05-messages/00-alert.mustache +15 -0
  133. data/source/_patterns/01-molecules/06-components/_00-social-share.mustache +0 -0
  134. data/source/_patterns/01-molecules/07-Elements/01-Addons-Card.mustache +79 -0
  135. data/source/_patterns/01-molecules/07-Elements/02-Buttons-Card.mustache +131 -0
  136. data/source/_patterns/01-molecules/07-Elements/03-Buildpack-Card.mustache +109 -0
  137. data/source/_patterns/01-molecules/08-vertical-tabs/01-vertical-tabs.mustache +30 -0
  138. data/source/_patterns/02-organisms/03-sections/00-purple.mustache +11 -0
  139. data/source/_patterns/02-organisms/03-sections/01-purple-dark.mustache +12 -0
  140. data/source/_patterns/02-organisms/03-sections/03-gray-light.mustache +12 -0
  141. data/source/css/hk-icon-rails.scss +13 -0
  142. data/source/css/scss/base/_base.scss +62 -0
  143. data/source/css/scss/base/_fonts.scss +12 -0
  144. data/source/css/scss/base/_normalize.scss +431 -0
  145. data/source/css/scss/base/_type.scss +128 -0
  146. data/source/css/scss/base/_utilities.scss +78 -0
  147. data/source/css/scss/components/_alert.scss +38 -0
  148. data/source/css/scss/components/_animate.scss +3340 -0
  149. data/source/css/scss/components/_animation.scss +15 -0
  150. data/source/css/scss/components/_buttons.scss +175 -0
  151. data/source/css/scss/components/_code.scss +26 -0
  152. data/source/css/scss/components/_forms.scss +136 -0
  153. data/source/css/scss/components/_hero.scss +18 -0
  154. data/source/css/scss/components/_hr.scss +11 -0
  155. data/source/css/scss/components/_icons.scss +85 -0
  156. data/source/css/scss/components/_lists.scss +45 -0
  157. data/source/css/scss/components/_logos.scss +15 -0
  158. data/source/css/scss/components/_masonary.scss +46 -0
  159. data/source/css/scss/components/_modal.scss +218 -0
  160. data/source/css/scss/components/_owlCarousel.scss +270 -0
  161. data/source/css/scss/components/_panel.scss +11 -0
  162. data/source/css/scss/components/_pill-box.scss +38 -0
  163. data/source/css/scss/components/_quote.scss +96 -0
  164. data/source/css/scss/components/_readmore.scss +11 -0
  165. data/source/css/scss/components/_slider.scss +96 -0
  166. data/source/css/scss/components/_spinner.scss +64 -0
  167. data/source/css/scss/components/_sprites.scss +3 -0
  168. data/source/css/scss/components/_sr-only.scss +10 -0
  169. data/source/css/scss/components/_tables.scss +62 -0
  170. data/source/css/scss/components/_tooltips.scss +93 -0
  171. data/source/css/scss/components/_users.scss +11 -0
  172. data/source/css/scss/components/_vertical-tabs.scss +129 -0
  173. data/source/css/scss/components/_video.scss +7 -0
  174. data/source/css/scss/ecosystem/_addons-card.scss +3 -0
  175. data/source/css/scss/ecosystem/_cards.scss +369 -0
  176. data/source/css/scss/ecosystem/_elements-brand.scss +32 -0
  177. data/source/css/scss/ecosystem/_elements.scss +4 -0
  178. data/source/css/scss/globals/_colors.scss +189 -0
  179. data/source/css/scss/globals/_mixins.scss +45 -0
  180. data/source/css/scss/globals/_variables.scss +87 -0
  181. data/source/css/scss/layout/_grid-settings.scss +13 -0
  182. data/source/css/scss/layout/_layout.scss +95 -0
  183. data/source/css/scss/page-elements/_headers.scss +3 -0
  184. data/source/css/scss/page-elements/_navigation.scss +254 -0
  185. data/source/css/scss/page-elements/_sections.scss +66 -0
  186. data/source/css/scss/page-elements/_sidebar.scss +34 -0
  187. data/source/css/shibori.scss +63 -0
  188. data/source/fonts/bentonsans/bentonsans-book.eot +0 -0
  189. data/source/fonts/bentonsans/bentonsans-book.svg +400 -0
  190. data/source/fonts/bentonsans/bentonsans-book.ttf +0 -0
  191. data/source/fonts/bentonsans/bentonsans-book.woff +0 -0
  192. data/source/fonts/bentonsans/bentonsans-medium.eot +0 -0
  193. data/source/fonts/bentonsans/bentonsans-medium.svg +416 -0
  194. data/source/fonts/bentonsans/bentonsans-medium.ttf +0 -0
  195. data/source/fonts/bentonsans/bentonsans-medium.woff +0 -0
  196. data/source/fonts/bentonsans/bentonsans-regular.eot +0 -0
  197. data/source/fonts/bentonsans/bentonsans-regular.svg +416 -0
  198. data/source/fonts/bentonsans/bentonsans-regular.ttf +0 -0
  199. data/source/fonts/bentonsans/bentonsans-regular.woff +0 -0
  200. data/source/fonts/hk-icon/hk-icon.eot +0 -0
  201. data/source/fonts/hk-icon/hk-icon.svg +261 -0
  202. data/source/fonts/hk-icon/hk-icon.ttf +0 -0
  203. data/source/fonts/hk-icon/hk-icon.woff +0 -0
  204. data/source/fonts/inconsolata/inconsolata-bold.eot +0 -0
  205. data/source/fonts/inconsolata/inconsolata-bold.svg +239 -0
  206. data/source/fonts/inconsolata/inconsolata-bold.ttf +0 -0
  207. data/source/fonts/inconsolata/inconsolata-bold.woff +0 -0
  208. data/source/fonts/inconsolata/inconsolata-regular.eot +0 -0
  209. data/source/fonts/inconsolata/inconsolata-regular.svg +239 -0
  210. data/source/fonts/inconsolata/inconsolata-regular.ttf +0 -0
  211. data/source/fonts/inconsolata/inconsolata-regular.woff +0 -0
  212. data/source/images/blockquote/close-sm.png +0 -0
  213. data/source/images/blockquote/close.png +0 -0
  214. data/source/images/blockquote/close@2x.png +0 -0
  215. data/source/images/blockquote/open-sm.png +0 -0
  216. data/source/images/blockquote/open.png +0 -0
  217. data/source/images/blockquote/open@2x.png +0 -0
  218. data/source/images/elements/heroku_suported.svg +32 -0
  219. data/source/images/forms/select-input-arrows.svg +8 -0
  220. data/source/js/init.js +26 -0
  221. data/source/js/main.js +22 -0
  222. data/source/js/vendor/bourbon-modal.js +17 -0
  223. data/source/js/vendor/fitvids.js +77 -0
  224. data/source/js/vendor/fixto.js +719 -0
  225. data/source/js/vendor/jquery-2.0.0b2.js +8690 -0
  226. data/source/js/vendor/modernizr.js +4 -0
  227. data/source/js/vendor/owl.carousel.js +3069 -0
  228. data/source/js/vendor/readmore.js +11 -0
  229. data/source/js/vendor/unslider.js +1 -0
  230. data/source/js/vendor/vertical-tabs.js +34 -0
  231. data/test/files/test.css +19 -0
  232. data/test/lineage_hunter_tests.js +262 -0
  233. data/test/list_item_hunter_tests.js +167 -0
  234. data/test/media_hunter_tests.js +74 -0
  235. data/test/object_factory_tests.js +62 -0
  236. data/test/parameter_hunter_tests.js +298 -0
  237. data/test/pattern_assembler_tests.js +43 -0
  238. data/test/patternlab_tests.js +8 -0
  239. metadata +320 -0
@@ -0,0 +1,298 @@
1
+ (function () {
2
+ "use strict";
3
+
4
+ var ph = require('../builder/parameter_hunter');
5
+
6
+ exports['parameter_hunter'] = {
7
+ 'pattern hunter finds and extends templates' : function(test){
8
+
9
+ //setup current pattern from what we would have during execution
10
+ var currentPattern = {
11
+ "fileName": "01-sticky-comment",
12
+ "subdir": "02-organisms/02-comments",
13
+ "name": "02-organisms-02-comments-01-sticky-comment",
14
+ "data": null,
15
+ "jsonFileData": {},
16
+ "patternName": "sticky-comment",
17
+ "patternLink": "02-organisms-02-comments-01-sticky-comment/02-organisms-02-comments-01-sticky-comment.html",
18
+ "patternGroup": "organisms",
19
+ "patternSubGroup": "comments",
20
+ "flatPatternPath": "02-organisms-02-comments",
21
+ "key": "organisms-sticky-comment",
22
+ "template": "{{> molecules-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}",
23
+ "patternPartial": "",
24
+ "lineage": [
25
+ ],
26
+ "lineageIndex": [
27
+ ],
28
+ "lineageR": [
29
+ ],
30
+ "lineageRIndex": [
31
+ ],
32
+ "patternState": "",
33
+ "extendedTemplate": "{{> molecules-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"
34
+ };
35
+ var patternlab = {
36
+ patterns: [
37
+ {
38
+ "fileName": "02-single-comment",
39
+ "subdir": "01-molecules/06-components",
40
+ "name": "01-molecules-06-components-02-single-comment",
41
+ "data": null,
42
+ "jsonFileData": {},
43
+ "patternName": "single-comment",
44
+ "patternLink": "01-molecules-06-components-02-single-comment/01-molecules-06-components-02-single-comment.html",
45
+ "patternGroup": "molecules",
46
+ "patternSubGroup": "components",
47
+ "flatPatternPath": "01-molecules-06-components",
48
+ "key": "molecules-single-comment",
49
+ "template": "<p>{{description}}</p>",
50
+ "patternPartial": "",
51
+ "lineage": [
52
+ ],
53
+ "lineageIndex": [
54
+ ],
55
+ "lineageR": [
56
+ ],
57
+ "lineageRIndex": [
58
+ ],
59
+ "patternState": "",
60
+ "extendedTemplate": "<p>{{description}}</p>"
61
+ }
62
+ ],
63
+ config: {
64
+ debug: false
65
+ },
66
+ data: {
67
+ description: 'Not a quote from a smart man'
68
+ }
69
+ };
70
+
71
+ var parameter_hunter = new ph();
72
+
73
+ parameter_hunter.find_parameters(currentPattern, patternlab);
74
+ test.equals(currentPattern.extendedTemplate, '<p>A life is like a garden. Perfect moments can be had, but not preserved, except in memory.</p>');
75
+
76
+ test.done();
77
+ },
78
+
79
+ 'pattern hunter finds and extends templates with mixed parameter and global data' : function(test){
80
+
81
+ //setup current pattern from what we would have during execution
82
+ var currentPattern = {
83
+ "fileName": "01-sticky-comment",
84
+ "subdir": "02-organisms/02-comments",
85
+ "name": "02-organisms-02-comments-01-sticky-comment",
86
+ "data": null,
87
+ "jsonFileData": {},
88
+ "patternName": "sticky-comment",
89
+ "patternLink": "02-organisms-02-comments-01-sticky-comment/02-organisms-02-comments-01-sticky-comment.html",
90
+ "patternGroup": "organisms",
91
+ "patternSubGroup": "comments",
92
+ "flatPatternPath": "02-organisms-02-comments",
93
+ "key": "organisms-sticky-comment",
94
+ "template": "{{> molecules-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}",
95
+ "patternPartial": "",
96
+ "lineage": [
97
+ ],
98
+ "lineageIndex": [
99
+ ],
100
+ "lineageR": [
101
+ ],
102
+ "lineageRIndex": [
103
+ ],
104
+ "patternState": "",
105
+ "extendedTemplate": "{{> molecules-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"
106
+ };
107
+ var patternlab = {
108
+ patterns: [
109
+ {
110
+ "fileName": "02-single-comment",
111
+ "subdir": "01-molecules/06-components",
112
+ "name": "01-molecules-06-components-02-single-comment",
113
+ "data": null,
114
+ "jsonFileData": {},
115
+ "patternName": "single-comment",
116
+ "patternLink": "01-molecules-06-components-02-single-comment/01-molecules-06-components-02-single-comment.html",
117
+ "patternGroup": "molecules",
118
+ "patternSubGroup": "components",
119
+ "flatPatternPath": "01-molecules-06-components",
120
+ "key": "molecules-single-comment",
121
+ "template": "<h1>{{foo}}</h1><p>{{description}}</p>",
122
+ "patternPartial": "",
123
+ "lineage": [
124
+ ],
125
+ "lineageIndex": [
126
+ ],
127
+ "lineageR": [
128
+ ],
129
+ "lineageRIndex": [
130
+ ],
131
+ "patternState": "",
132
+ "extendedTemplate": "<h1>{{foo}}</h1><p>{{description}}</p>"
133
+ }
134
+ ],
135
+ config: {
136
+ debug: false
137
+ },
138
+ data: {
139
+ foo: 'Bar',
140
+ description: 'Baz'
141
+ }
142
+ };
143
+
144
+ var parameter_hunter = new ph();
145
+
146
+ parameter_hunter.find_parameters(currentPattern, patternlab);
147
+ test.equals(currentPattern.extendedTemplate, '<h1>Bar</h1><p>A life is like a garden. Perfect moments can be had, but not preserved, except in memory.</p>');
148
+
149
+ test.done();
150
+ },
151
+
152
+ 'pattern hunter finds and extends templates with verbose partials' : function(test){
153
+
154
+ //setup current pattern from what we would have during execution
155
+ var currentPattern = {
156
+ "fileName": "01-sticky-comment",
157
+ "subdir": "02-organisms/02-comments",
158
+ "name": "02-organisms-02-comments-01-sticky-comment",
159
+ "data": null,
160
+ "jsonFileData": {},
161
+ "patternName": "sticky-comment",
162
+ "patternLink": "02-organisms-02-comments-01-sticky-comment/02-organisms-02-comments-01-sticky-comment.html",
163
+ "patternGroup": "organisms",
164
+ "patternSubGroup": "comments",
165
+ "flatPatternPath": "02-organisms-02-comments",
166
+ "key": "organisms-sticky-comment",
167
+ "template": "{{> 01-molecules/06-components/02-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}",
168
+ "patternPartial": "",
169
+ "lineage": [
170
+ ],
171
+ "lineageIndex": [
172
+ ],
173
+ "lineageR": [
174
+ ],
175
+ "lineageRIndex": [
176
+ ],
177
+ "patternState": "",
178
+ "extendedTemplate": "{{> 01-molecules/06-components/02-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"
179
+ };
180
+ var patternlab = {
181
+ patterns: [
182
+ {
183
+ "fileName": "02-single-comment",
184
+ "subdir": "01-molecules/06-components",
185
+ "name": "01-molecules-06-components-02-single-comment",
186
+ "data": null,
187
+ "jsonFileData": {},
188
+ "patternName": "single-comment",
189
+ "patternLink": "01-molecules-06-components-02-single-comment/01-molecules-06-components-02-single-comment.html",
190
+ "patternGroup": "molecules",
191
+ "patternSubGroup": "components",
192
+ "flatPatternPath": "01-molecules-06-components",
193
+ "key": "molecules-single-comment",
194
+ "template": "<p>{{description}}</p>",
195
+ "patternPartial": "",
196
+ "lineage": [
197
+ ],
198
+ "lineageIndex": [
199
+ ],
200
+ "lineageR": [
201
+ ],
202
+ "lineageRIndex": [
203
+ ],
204
+ "patternState": "",
205
+ "extendedTemplate": "<p>{{description}}</p>"
206
+ }
207
+ ],
208
+ config: {
209
+ debug: false
210
+ },
211
+ data: {
212
+ description: 'Not a quote from a smart man'
213
+ }
214
+ };
215
+
216
+ var parameter_hunter = new ph();
217
+
218
+ parameter_hunter.find_parameters(currentPattern, patternlab);
219
+ test.equals(currentPattern.extendedTemplate, '<p>A life is like a garden. Perfect moments can be had, but not preserved, except in memory.</p>');
220
+
221
+ test.done();
222
+ },
223
+
224
+ 'pattern hunter finds and extends templates with fully-pathed partials' : function(test){
225
+
226
+ //setup current pattern from what we would have during execution
227
+ var currentPattern = {
228
+ "fileName": "01-sticky-comment",
229
+ "subdir": "02-organisms/02-comments",
230
+ "name": "02-organisms-02-comments-01-sticky-comment",
231
+ "data": null,
232
+ "jsonFileData": {},
233
+ "patternName": "sticky-comment",
234
+ "patternLink": "02-organisms-02-comments-01-sticky-comment/02-organisms-02-comments-01-sticky-comment.html",
235
+ "patternGroup": "organisms",
236
+ "patternSubGroup": "comments",
237
+ "flatPatternPath": "02-organisms-02-comments",
238
+ "key": "organisms-sticky-comment",
239
+ "template": "{{> 01-molecules/06-components/02-single-comment.mustache(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}",
240
+ "patternPartial": "",
241
+ "lineage": [
242
+ ],
243
+ "lineageIndex": [
244
+ ],
245
+ "lineageR": [
246
+ ],
247
+ "lineageRIndex": [
248
+ ],
249
+ "patternState": "",
250
+ "extendedTemplate": "{{> 01-molecules/06-components/02-single-comment.mustache(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}"
251
+ };
252
+ var patternlab = {
253
+ patterns: [
254
+ {
255
+ "fileName": "02-single-comment",
256
+ "subdir": "01-molecules/06-components",
257
+ "name": "01-molecules-06-components-02-single-comment",
258
+ "data": null,
259
+ "jsonFileData": {},
260
+ "patternName": "single-comment",
261
+ "patternLink": "01-molecules-06-components-02-single-comment/01-molecules-06-components-02-single-comment.html",
262
+ "patternGroup": "molecules",
263
+ "patternSubGroup": "components",
264
+ "flatPatternPath": "01-molecules-06-components",
265
+ "key": "molecules-single-comment",
266
+ "template": "<p>{{description}}</p>",
267
+ "patternPartial": "",
268
+ "lineage": [
269
+ ],
270
+ "lineageIndex": [
271
+ ],
272
+ "lineageR": [
273
+ ],
274
+ "lineageRIndex": [
275
+ ],
276
+ "patternState": "",
277
+ "extendedTemplate": "<p>{{description}}</p>"
278
+ }
279
+ ],
280
+ config: {
281
+ debug: false
282
+ },
283
+ data: {
284
+ description: 'Not a quote from a smart man'
285
+ }
286
+ };
287
+
288
+ var parameter_hunter = new ph();
289
+
290
+ parameter_hunter.find_parameters(currentPattern, patternlab);
291
+ test.equals(currentPattern.extendedTemplate, '<p>A life is like a garden. Perfect moments can be had, but not preserved, except in memory.</p>');
292
+
293
+ test.done();
294
+ }
295
+
296
+ };
297
+
298
+ }());
@@ -0,0 +1,43 @@
1
+ (function () {
2
+ "use strict";
3
+
4
+ var pa = require('../builder/pattern_assembler');
5
+
6
+ exports['pattern_assembler'] = {
7
+ 'find_pattern_partials finds partials' : function(test){
8
+
9
+ //setup current pattern from what we would have during execution
10
+ var currentPattern = {
11
+ "template": "<h1>{{> molecules-comment-header}}</h1><div>{{> molecules-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}</div>",
12
+ };
13
+
14
+ var pattern_assembler = new pa();
15
+
16
+ var results = pattern_assembler.find_pattern_partials(currentPattern);
17
+ test.equals(results.length, 2);
18
+ test.equals(results[0], '{{> molecules-comment-header}}');
19
+ test.equals(results[1], '{{> molecules-single-comment(description: \'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.\') }}');
20
+
21
+ test.done();
22
+ },
23
+
24
+ 'find_pattern_partials finds verbose partials' : function(test){
25
+
26
+ //setup current pattern from what we would have during execution
27
+ var currentPattern = {
28
+ "template": "<h1>{{> 01-molecules/06-components/03-comment-header.mustache }}</h1><div>{{> 01-molecules/06-components/02-single-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }}</div>",
29
+ };
30
+
31
+ var pattern_assembler = new pa();
32
+
33
+ var results = pattern_assembler.find_pattern_partials(currentPattern);
34
+ test.equals(results.length, 2);
35
+ test.equals(results[0], '{{> 01-molecules/06-components/03-comment-header.mustache }}');
36
+ test.equals(results[1], '{{> 01-molecules/06-components/02-single-comment(description: \'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.\') }}');
37
+
38
+ test.done();
39
+ }
40
+
41
+ };
42
+
43
+ }());
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ exports['test nodeunit'] = {
4
+ 'hello world' : function(test){
5
+ test.equals(1,1);
6
+ test.done();
7
+ }
8
+ };
metadata ADDED
@@ -0,0 +1,320 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shibori
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Heroku
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bourbon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "<"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.0.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.1.8
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "<"
28
+ - !ruby/object:Gem::Version
29
+ version: 5.0.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.1.8
33
+ - !ruby/object:Gem::Dependency
34
+ name: neat
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.7'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.7.2
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.7'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 1.7.2
53
+ description: shibori styleguide
54
+ email: heroku@heroku.com
55
+ executables: []
56
+ extensions: []
57
+ extra_rdoc_files: []
58
+ files:
59
+ - ".gitignore"
60
+ - Gemfile
61
+ - Gemfile.lock
62
+ - Procfile
63
+ - README.md
64
+ - Rakefile
65
+ - app.json
66
+ - builder/lineage_hunter.js
67
+ - builder/list_item_hunter.js
68
+ - builder/media_hunter.js
69
+ - builder/object_factory.js
70
+ - builder/parameter_hunter.js
71
+ - builder/pattern_assembler.js
72
+ - builder/pattern_exporter.js
73
+ - builder/patternlab.js
74
+ - builder/patternlab_grunt.js
75
+ - builder/patternlab_gulp.js
76
+ - builder/pseudopattern_hunter.js
77
+ - config.json
78
+ - docs/Pattern Lab Node.md
79
+ - favicon.ico
80
+ - gulpfile.js
81
+ - index.js
82
+ - lib/shibori.rb
83
+ - lib/shibori/version.rb
84
+ - package.json
85
+ - public/data/annotations.js
86
+ - public/styleguide/css/static.css
87
+ - public/styleguide/css/static.scss
88
+ - public/styleguide/css/styleguide-specific.css
89
+ - public/styleguide/css/styleguide-specific.scss
90
+ - public/styleguide/css/styleguide.css
91
+ - public/styleguide/css/styleguide.scss
92
+ - public/styleguide/css/vendor/prism.css
93
+ - public/styleguide/css/vendor/typeahead.css
94
+ - public/styleguide/fonts/icomoon.eot
95
+ - public/styleguide/fonts/icomoon.svg
96
+ - public/styleguide/fonts/icomoon.ttf
97
+ - public/styleguide/fonts/icomoon.woff
98
+ - public/styleguide/html/README
99
+ - public/styleguide/images/spinner.gif
100
+ - public/styleguide/js/annotations-pattern.js
101
+ - public/styleguide/js/annotations-viewer.js
102
+ - public/styleguide/js/code-pattern.js
103
+ - public/styleguide/js/code-viewer.js
104
+ - public/styleguide/js/data-saver.js
105
+ - public/styleguide/js/pattern-finder.js
106
+ - public/styleguide/js/postmessage.js
107
+ - public/styleguide/js/styleguide.js
108
+ - public/styleguide/js/url-handler.js
109
+ - public/styleguide/js/vendor/classlist-polyfill.js
110
+ - public/styleguide/js/vendor/jquery.js
111
+ - public/styleguide/js/vendor/jwerty.js
112
+ - public/styleguide/js/vendor/prism.js
113
+ - public/styleguide/js/vendor/typeahead.bundle.min.js
114
+ - script/bootstrap
115
+ - shibori.gemspec
116
+ - shibori.jpg
117
+ - source/_data/annotations.js
118
+ - source/_data/data.json
119
+ - source/_data/listitems.json
120
+ - source/_patternlab-files/README
121
+ - source/_patternlab-files/index.mustache
122
+ - source/_patternlab-files/partials/ishControls.mustache
123
+ - source/_patternlab-files/partials/patternNav.mustache
124
+ - source/_patternlab-files/partials/patternPaths.mustache
125
+ - source/_patternlab-files/partials/viewAllPaths.mustache
126
+ - source/_patternlab-files/pattern-header-footer/README
127
+ - source/_patternlab-files/pattern-header-footer/footer.html
128
+ - source/_patternlab-files/pattern-header-footer/header.html
129
+ - source/_patternlab-files/styleguide.mustache
130
+ - source/_patternlab-files/viewall.mustache
131
+ - source/_patterns/00-atoms/00-typography/00-headings.mustache
132
+ - source/_patterns/00-atoms/00-typography/01-headings-options.mustache
133
+ - source/_patterns/00-atoms/00-typography/02-body.mustache
134
+ - source/_patterns/00-atoms/00-typography/03-text-manipulation.mustache
135
+ - source/_patterns/00-atoms/00-typography/04-blockquotes.mustache
136
+ - source/_patterns/00-atoms/00-typography/05-lists.mustache
137
+ - source/_patterns/00-atoms/01-colors/00-colors-monochromatic.mustache
138
+ - source/_patterns/00-atoms/01-colors/01-colors-brand.mustache
139
+ - source/_patterns/00-atoms/01-colors/02-colors-gradients.mustache
140
+ - source/_patterns/00-atoms/02-buttons/00-btn-lg.mustache
141
+ - source/_patterns/00-atoms/02-buttons/01-btn-sm.mustache
142
+ - source/_patterns/00-atoms/02-buttons/02-btn-xs.mustache
143
+ - source/_patterns/00-atoms/02-buttons/03-btn-block.mustache
144
+ - source/_patterns/00-atoms/02-buttons/04-btn-deploy.mustache
145
+ - source/_patterns/00-atoms/03-forms/00-text-fields.mustache
146
+ - source/_patterns/00-atoms/03-forms/01-select-menu.mustache
147
+ - source/_patterns/00-atoms/03-forms/02-checkbox.mustache
148
+ - source/_patterns/00-atoms/03-forms/03-radios.mustache
149
+ - source/_patterns/00-atoms/03-forms/04-validation.mustache
150
+ - source/_patterns/00-atoms/04-quote/00-pullquote.mustache
151
+ - source/_patterns/00-atoms/04-quote/01-quote-small.mustache
152
+ - source/_patterns/00-atoms/05-code/01-pre.mustache
153
+ - source/_patterns/00-atoms/06-tooltips/00-text.mustache
154
+ - source/_patterns/00-atoms/06-tooltips/01-diagram-callout.mustache
155
+ - source/_patterns/00-atoms/07-loader/00-spinner.mustache
156
+ - source/_patterns/00-atoms/08-readmore/00-readmore.mustache
157
+ - source/_patterns/00-atoms/09-slider/00-dots.mustache
158
+ - source/_patterns/00-atoms/10-tables/00-tables.mustache
159
+ - source/_patterns/00-atoms/12-modal/00-modal.mustache
160
+ - source/_patterns/00-atoms/13-panel/00-panel.mustache
161
+ - source/_patterns/00-atoms/14-users/00-avatar.mustache
162
+ - source/_patterns/00-atoms/15-icons/00-icons.mustache
163
+ - source/_patterns/00-atoms/15-icons/04-icon-colors.mustache
164
+ - source/_patterns/00-atoms/15-icons/05-icon-sizes.mustache
165
+ - source/_patterns/00-atoms/15-icons/_02-languages.mustache
166
+ - source/_patterns/00-atoms/15-icons/_03-social.mustache
167
+ - source/_patterns/00-atoms/15-icons/_05-icon-containers.mustache
168
+ - source/_patterns/00-atoms/16-video/01-video.mustache
169
+ - source/_patterns/00-atoms/16-video/_00-play-button.mustache
170
+ - source/_patterns/00-atoms/17-utilities/00-visibility.mustache
171
+ - source/_patterns/00-atoms/17-utilities/01-ui-elements.mustache
172
+ - source/_patterns/00-atoms/18-grid/_00-grid.mustache
173
+ - source/_patterns/01-molecules/00-text/00-header-groups.mustache
174
+ - source/_patterns/01-molecules/00-text/01-intro-text.mustache
175
+ - source/_patterns/01-molecules/01-layout/00-one-up.mustache
176
+ - source/_patterns/01-molecules/01-layout/01-two-up.mustache
177
+ - source/_patterns/01-molecules/01-layout/02-three-up.mustache
178
+ - source/_patterns/01-molecules/01-layout/03-four-up.mustache
179
+ - source/_patterns/01-molecules/01-layout/04-masonary-2.mustache
180
+ - source/_patterns/01-molecules/01-layout/05-masonary-3.mustache
181
+ - source/_patterns/01-molecules/02-navigation/01-subnav.mustache
182
+ - source/_patterns/01-molecules/02-navigation/02-breadcrumbs.mustache
183
+ - source/_patterns/01-molecules/02-navigation/03-side-nav.mustache
184
+ - source/_patterns/01-molecules/02-navigation/04-side-nav-small.mustache
185
+ - source/_patterns/01-molecules/02-navigation/05-pagination.mustache
186
+ - source/_patterns/01-molecules/02-navigation/06-tabs.mustache
187
+ - source/_patterns/01-molecules/03-forms/_00-search.mustache
188
+ - source/_patterns/01-molecules/04-slider/00-slider.mustache
189
+ - source/_patterns/01-molecules/05-messages/00-alert.mustache
190
+ - source/_patterns/01-molecules/06-components/_00-social-share.mustache
191
+ - source/_patterns/01-molecules/07-Elements/01-Addons-Card.mustache
192
+ - source/_patterns/01-molecules/07-Elements/02-Buttons-Card.mustache
193
+ - source/_patterns/01-molecules/07-Elements/03-Buildpack-Card.mustache
194
+ - source/_patterns/01-molecules/08-vertical-tabs/01-vertical-tabs.mustache
195
+ - source/_patterns/02-organisms/03-sections/00-purple.mustache
196
+ - source/_patterns/02-organisms/03-sections/01-purple-dark.mustache
197
+ - source/_patterns/02-organisms/03-sections/03-gray-light.mustache
198
+ - source/css/hk-icon-rails.scss
199
+ - source/css/scss/base/_base.scss
200
+ - source/css/scss/base/_fonts.scss
201
+ - source/css/scss/base/_normalize.scss
202
+ - source/css/scss/base/_type.scss
203
+ - source/css/scss/base/_utilities.scss
204
+ - source/css/scss/components/_alert.scss
205
+ - source/css/scss/components/_animate.scss
206
+ - source/css/scss/components/_animation.scss
207
+ - source/css/scss/components/_buttons.scss
208
+ - source/css/scss/components/_code.scss
209
+ - source/css/scss/components/_forms.scss
210
+ - source/css/scss/components/_hero.scss
211
+ - source/css/scss/components/_hr.scss
212
+ - source/css/scss/components/_icons.scss
213
+ - source/css/scss/components/_lists.scss
214
+ - source/css/scss/components/_logos.scss
215
+ - source/css/scss/components/_masonary.scss
216
+ - source/css/scss/components/_modal.scss
217
+ - source/css/scss/components/_owlCarousel.scss
218
+ - source/css/scss/components/_panel.scss
219
+ - source/css/scss/components/_pill-box.scss
220
+ - source/css/scss/components/_quote.scss
221
+ - source/css/scss/components/_readmore.scss
222
+ - source/css/scss/components/_slider.scss
223
+ - source/css/scss/components/_spinner.scss
224
+ - source/css/scss/components/_sprites.scss
225
+ - source/css/scss/components/_sr-only.scss
226
+ - source/css/scss/components/_tables.scss
227
+ - source/css/scss/components/_tooltips.scss
228
+ - source/css/scss/components/_users.scss
229
+ - source/css/scss/components/_vertical-tabs.scss
230
+ - source/css/scss/components/_video.scss
231
+ - source/css/scss/ecosystem/_addons-card.scss
232
+ - source/css/scss/ecosystem/_cards.scss
233
+ - source/css/scss/ecosystem/_elements-brand.scss
234
+ - source/css/scss/ecosystem/_elements.scss
235
+ - source/css/scss/globals/_colors.scss
236
+ - source/css/scss/globals/_mixins.scss
237
+ - source/css/scss/globals/_variables.scss
238
+ - source/css/scss/layout/_grid-settings.scss
239
+ - source/css/scss/layout/_layout.scss
240
+ - source/css/scss/page-elements/_headers.scss
241
+ - source/css/scss/page-elements/_navigation.scss
242
+ - source/css/scss/page-elements/_sections.scss
243
+ - source/css/scss/page-elements/_sidebar.scss
244
+ - source/css/shibori.scss
245
+ - source/fonts/bentonsans/bentonsans-book.eot
246
+ - source/fonts/bentonsans/bentonsans-book.svg
247
+ - source/fonts/bentonsans/bentonsans-book.ttf
248
+ - source/fonts/bentonsans/bentonsans-book.woff
249
+ - source/fonts/bentonsans/bentonsans-medium.eot
250
+ - source/fonts/bentonsans/bentonsans-medium.svg
251
+ - source/fonts/bentonsans/bentonsans-medium.ttf
252
+ - source/fonts/bentonsans/bentonsans-medium.woff
253
+ - source/fonts/bentonsans/bentonsans-regular.eot
254
+ - source/fonts/bentonsans/bentonsans-regular.svg
255
+ - source/fonts/bentonsans/bentonsans-regular.ttf
256
+ - source/fonts/bentonsans/bentonsans-regular.woff
257
+ - source/fonts/hk-icon/hk-icon.eot
258
+ - source/fonts/hk-icon/hk-icon.svg
259
+ - source/fonts/hk-icon/hk-icon.ttf
260
+ - source/fonts/hk-icon/hk-icon.woff
261
+ - source/fonts/inconsolata/inconsolata-bold.eot
262
+ - source/fonts/inconsolata/inconsolata-bold.svg
263
+ - source/fonts/inconsolata/inconsolata-bold.ttf
264
+ - source/fonts/inconsolata/inconsolata-bold.woff
265
+ - source/fonts/inconsolata/inconsolata-regular.eot
266
+ - source/fonts/inconsolata/inconsolata-regular.svg
267
+ - source/fonts/inconsolata/inconsolata-regular.ttf
268
+ - source/fonts/inconsolata/inconsolata-regular.woff
269
+ - source/images/blockquote/close-sm.png
270
+ - source/images/blockquote/close.png
271
+ - source/images/blockquote/close@2x.png
272
+ - source/images/blockquote/open-sm.png
273
+ - source/images/blockquote/open.png
274
+ - source/images/blockquote/open@2x.png
275
+ - source/images/elements/heroku_suported.svg
276
+ - source/images/forms/select-input-arrows.svg
277
+ - source/js/init.js
278
+ - source/js/main.js
279
+ - source/js/vendor/bourbon-modal.js
280
+ - source/js/vendor/fitvids.js
281
+ - source/js/vendor/fixto.js
282
+ - source/js/vendor/jquery-2.0.0b2.js
283
+ - source/js/vendor/modernizr.js
284
+ - source/js/vendor/owl.carousel.js
285
+ - source/js/vendor/readmore.js
286
+ - source/js/vendor/unslider.js
287
+ - source/js/vendor/vertical-tabs.js
288
+ - test/files/test.css
289
+ - test/lineage_hunter_tests.js
290
+ - test/list_item_hunter_tests.js
291
+ - test/media_hunter_tests.js
292
+ - test/object_factory_tests.js
293
+ - test/parameter_hunter_tests.js
294
+ - test/pattern_assembler_tests.js
295
+ - test/patternlab_tests.js
296
+ homepage: https://www.github.com/heroku/shibori
297
+ licenses:
298
+ - All rights reserved
299
+ metadata: {}
300
+ post_install_message:
301
+ rdoc_options: []
302
+ require_paths:
303
+ - lib
304
+ required_ruby_version: !ruby/object:Gem::Requirement
305
+ requirements:
306
+ - - ">="
307
+ - !ruby/object:Gem::Version
308
+ version: '0'
309
+ required_rubygems_version: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - ">"
312
+ - !ruby/object:Gem::Version
313
+ version: 1.3.1
314
+ requirements: []
315
+ rubyforge_project:
316
+ rubygems_version: 2.5.1
317
+ signing_key:
318
+ specification_version: 4
319
+ summary: shibori styleguide
320
+ test_files: []