refills 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.hound.yml +3 -2
  3. data/.ruby-version +1 -1
  4. data/.scss-lint.yml +97 -24
  5. data/CONTRIBUTING.md +4 -3
  6. data/Gemfile +13 -10
  7. data/README.md +31 -15
  8. data/circle.yml +7 -0
  9. data/config.rb +4 -13
  10. data/{lib → helpers}/snippet_helpers.rb +14 -6
  11. data/lib/refills/version.rb +1 -1
  12. data/refills.gemspec +2 -2
  13. data/sache.json +1 -1
  14. data/source/_badges.html.erb +1 -1
  15. data/source/_cards.html.erb +1 -1
  16. data/source/_centered_navigation.html.erb +5 -5
  17. data/source/_comment.html.erb +2 -2
  18. data/source/_device.html.erb +0 -1
  19. data/source/_expander.html.erb +2 -2
  20. data/source/_flex_boxes.html.erb +6 -6
  21. data/source/_footer.html.erb +1 -1
  22. data/source/_footer_2.html.erb +1 -1
  23. data/source/_grid_items.html.erb +7 -7
  24. data/source/_grid_items_lines.html.erb +8 -8
  25. data/source/_hero.html.erb +4 -9
  26. data/source/_icon_bullet_points.html.erb +6 -7
  27. data/source/_logo_section.html.erb +8 -0
  28. data/source/_modal.html.erb +2 -2
  29. data/source/_navigation.html.erb +2 -3
  30. data/source/_search_bar.html.erb +1 -1
  31. data/source/_search_tools.html.erb +54 -52
  32. data/source/_side_image.html.erb +0 -1
  33. data/source/_sliding_panel.html.erb +13 -0
  34. data/source/_type_system_geometric.html.erb +4 -3
  35. data/source/_type_system_rounded.html.erb +3 -3
  36. data/source/_type_system_sans.html.erb +3 -3
  37. data/source/_type_system_serif.html.erb +4 -4
  38. data/source/_type_system_slab.html.erb +3 -3
  39. data/source/_type_system_traditional.html.erb +3 -3
  40. data/source/components.html.erb +9 -5
  41. data/source/images/background-image.png +0 -0
  42. data/source/images/cosmin_capitanu_screen.jpg +0 -0
  43. data/source/images/new.svg +22 -0
  44. data/source/images/placeholder_square.png +0 -0
  45. data/source/images/placeholder_wide.png +0 -0
  46. data/source/images/placeholder_wider.png +0 -0
  47. data/source/index.html.erb +10 -3
  48. data/source/javascripts/jquery.erToc.js +1 -6
  49. data/source/javascripts/refills/accordion_base.js +5 -0
  50. data/source/javascripts/refills/accordion_tabs.js +1 -2
  51. data/source/javascripts/refills/accordion_tabs_minimal.js +1 -2
  52. data/source/javascripts/refills/base-accordion.js +5 -0
  53. data/source/javascripts/refills/centered_navigation.js +27 -9
  54. data/source/javascripts/refills/coffeescript/accordion.coffee +3 -4
  55. data/source/javascripts/refills/coffeescript/accordion_base.coffee +6 -0
  56. data/source/javascripts/refills/coffeescript/accordion_tabs.coffee +9 -12
  57. data/source/javascripts/refills/coffeescript/accordion_tabs_minimal.coffee +9 -12
  58. data/source/javascripts/refills/coffeescript/animate.coffee +4 -7
  59. data/source/javascripts/refills/coffeescript/base-accordion.coffee +5 -0
  60. data/source/javascripts/refills/coffeescript/centered_navigation.coffee +6 -8
  61. data/source/javascripts/refills/coffeescript/dropdown.coffee +6 -10
  62. data/source/javascripts/refills/coffeescript/expander.coffee +4 -6
  63. data/source/javascripts/refills/coffeescript/fade_in.coffee +6 -8
  64. data/source/javascripts/refills/coffeescript/modal.coffee +7 -11
  65. data/source/javascripts/refills/coffeescript/navigation.coffee +6 -8
  66. data/source/javascripts/refills/coffeescript/parallax.coffee +9 -8
  67. data/source/javascripts/refills/coffeescript/scroll_on_page.coffee +6 -11
  68. data/source/javascripts/refills/coffeescript/search_tools.coffee +0 -85
  69. data/source/javascripts/refills/coffeescript/sliding_panel.coffee +6 -0
  70. data/source/javascripts/refills/coffeescript/vertical_tabs.coffee +21 -21
  71. data/source/javascripts/refills/dropdown.js +8 -8
  72. data/source/javascripts/refills/expander.js +1 -4
  73. data/source/javascripts/refills/modal.js +1 -1
  74. data/source/javascripts/refills/navigation.js +26 -7
  75. data/source/javascripts/refills/navigation_centered.js +13 -0
  76. data/source/javascripts/refills/scroll_on_page.js +8 -5
  77. data/source/javascripts/refills/search_tools.js +2 -2
  78. data/source/javascripts/refills/sliding_panel.js +6 -0
  79. data/source/javascripts/refills/unstyled/accordion.js +5 -0
  80. data/source/javascripts/refills/unstyled/accordion_tabs.js +18 -0
  81. data/source/javascripts/refills/unstyled/dropdown.js +12 -0
  82. data/source/javascripts/refills/unstyled/expander.js +8 -0
  83. data/source/javascripts/refills/unstyled/modal.js +17 -0
  84. data/source/javascripts/refills/unstyled/navigation.js +13 -0
  85. data/source/javascripts/refills/unstyled/navigation_centered.js +13 -0
  86. data/source/javascripts/refills/unstyled/scroll_on_page.js +29 -0
  87. data/source/javascripts/refills/unstyled/sliding_panel.js +6 -0
  88. data/source/javascripts/refills/unstyled/vertical_tabs.js +32 -0
  89. data/source/layouts/layout.erb +3 -3
  90. data/source/refills-hero.html.erb +6 -3
  91. data/source/stylesheets/_bourbon-nav.scss +14 -7
  92. data/source/stylesheets/_refill.scss +215 -0
  93. data/source/stylesheets/_refills-footer.scss +62 -0
  94. data/source/stylesheets/_refills-header.scss +113 -0
  95. data/source/stylesheets/_refills-menu.scss +91 -0
  96. data/source/stylesheets/_refills-nav.scss +13 -13
  97. data/source/stylesheets/_refills-styles.scss +8 -644
  98. data/source/stylesheets/_refills-variables.scss +20 -0
  99. data/source/stylesheets/all.css.scss +78 -0
  100. data/source/stylesheets/refills/_accordion-tabs-minimal.scss +9 -14
  101. data/source/stylesheets/refills/_accordion-tabs.scss +11 -16
  102. data/source/stylesheets/refills/_accordion.scss +13 -29
  103. data/source/stylesheets/refills/_animate.scss +9 -10
  104. data/source/stylesheets/refills/_badges.scss +18 -35
  105. data/source/stylesheets/refills/_breadcrumbs.scss +15 -19
  106. data/source/stylesheets/refills/_button-group.scss +6 -12
  107. data/source/stylesheets/refills/_cards.scss +22 -31
  108. data/source/stylesheets/refills/_centered-navigation.scss +16 -13
  109. data/source/stylesheets/refills/_comment.scss +3 -6
  110. data/source/stylesheets/refills/_device.scss +29 -40
  111. data/source/stylesheets/refills/_dropdown.scss +17 -27
  112. data/source/stylesheets/refills/_expander.scss +14 -21
  113. data/source/stylesheets/refills/_fade-in.scss +7 -11
  114. data/source/stylesheets/refills/_flashes.scss +21 -33
  115. data/source/stylesheets/refills/_flex-boxes.scss +18 -26
  116. data/source/stylesheets/refills/_footer-2.scss +19 -33
  117. data/source/stylesheets/refills/_footer.scss +15 -38
  118. data/source/stylesheets/refills/_grid-items-lines.scss +12 -21
  119. data/source/stylesheets/refills/_grid-items.scss +31 -40
  120. data/source/stylesheets/refills/_hero.scss +22 -55
  121. data/source/stylesheets/refills/_hover-tile-animation.scss +8 -17
  122. data/source/stylesheets/refills/_icon-bullet-points.scss +26 -35
  123. data/source/stylesheets/refills/_image-gradient-dynamic.scss +31 -20
  124. data/source/stylesheets/refills/_logo-section.scss +25 -0
  125. data/source/stylesheets/refills/_maps.scss +2 -2
  126. data/source/stylesheets/refills/_modal.scss +32 -45
  127. data/source/stylesheets/refills/_navigation.scss +33 -39
  128. data/source/stylesheets/refills/_pagination.scss +10 -23
  129. data/source/stylesheets/refills/_progress-bar-indication.scss +8 -15
  130. data/source/stylesheets/refills/_progress-bar.scss +24 -26
  131. data/source/stylesheets/refills/_ribbon.scss +4 -5
  132. data/source/stylesheets/refills/_scroll-on-page.scss +12 -15
  133. data/source/stylesheets/refills/_search-bar.scss +6 -13
  134. data/source/stylesheets/refills/_search-tools.scss +41 -42
  135. data/source/stylesheets/refills/_side-image.scss +8 -20
  136. data/source/stylesheets/refills/_sliding-panel.scss +79 -0
  137. data/source/stylesheets/refills/_stats.scss +2 -3
  138. data/source/stylesheets/refills/_switch.scss +13 -16
  139. data/source/stylesheets/refills/_tables-minimal.scss +12 -24
  140. data/source/stylesheets/refills/_tables.scss +11 -20
  141. data/source/stylesheets/refills/_texture-legend.scss +17 -13
  142. data/source/stylesheets/refills/_textures.scss +13 -9
  143. data/source/stylesheets/refills/_tooltip.scss +9 -16
  144. data/source/stylesheets/refills/_type-system-geometric.scss +14 -17
  145. data/source/stylesheets/refills/_type-system-rounded.scss +19 -19
  146. data/source/stylesheets/refills/_type-system-sans.scss +26 -26
  147. data/source/stylesheets/refills/_type-system-serif.scss +17 -20
  148. data/source/stylesheets/refills/_type-system-slab.scss +14 -17
  149. data/source/stylesheets/refills/_type-system-traditional.scss +18 -21
  150. data/source/stylesheets/refills/_vertical-tabs.scss +26 -30
  151. data/source/stylesheets/refills/_video.scss +1 -1
  152. data/source/stylesheets/refills/unstyled/_accordion-tabs.scss +36 -0
  153. data/source/stylesheets/refills/unstyled/_accordion.scss +17 -0
  154. data/source/stylesheets/refills/unstyled/_button-group.scss +30 -0
  155. data/source/stylesheets/refills/unstyled/_cards.scss +20 -0
  156. data/source/stylesheets/refills/unstyled/_comment.scss +28 -0
  157. data/source/stylesheets/refills/unstyled/_dropdown.scss +42 -0
  158. data/source/stylesheets/refills/unstyled/_expander.scss +20 -0
  159. data/source/stylesheets/refills/unstyled/_footer.scss +64 -0
  160. data/source/stylesheets/refills/unstyled/_hover-menu.scss +60 -0
  161. data/source/stylesheets/refills/unstyled/_modal.scss +71 -0
  162. data/source/stylesheets/refills/unstyled/_navigation-centered.scss +92 -0
  163. data/source/stylesheets/refills/unstyled/_navigation.scss +82 -0
  164. data/source/stylesheets/refills/unstyled/_scroll-on-page.scss +22 -0
  165. data/source/stylesheets/refills/unstyled/_search-bar.scss +26 -0
  166. data/source/stylesheets/refills/unstyled/_sliding-panel.scss +36 -0
  167. data/source/stylesheets/refills/unstyled/_switch.scss +50 -0
  168. data/source/stylesheets/refills/unstyled/_tooltip.scss +36 -0
  169. data/source/stylesheets/refills/unstyled/_vertical-tabs.scss +53 -0
  170. data/source/stylesheets/vendor/prism.css +4 -4
  171. data/source/svgs/_menu_icon.html.erb +6 -0
  172. data/source/svgs/_refills_logo.html.erb +8 -0
  173. data/source/type-systems.html.erb +5 -1
  174. data/spec/refills/import_generator_spec.rb +1 -1
  175. metadata +59 -19
  176. data/.travis.yml +0 -8
  177. data/source/_sliding_menu.html.erb +0 -13
  178. data/source/images/placeholder_logo_1.png +0 -0
  179. data/source/images/placeholder_logo_1_dark.png +0 -0
  180. data/source/images/placeholder_logo_2.png +0 -0
  181. data/source/images/placeholder_logo_2_dark.png +0 -0
  182. data/source/images/placeholder_logo_3.png +0 -0
  183. data/source/images/placeholder_logo_3_dark.png +0 -0
  184. data/source/images/placeholder_logo_4.png +0 -0
  185. data/source/images/placeholder_logo_4_dark.png +0 -0
  186. data/source/javascripts/refills/sliding_menu.js +0 -6
  187. data/source/stylesheets/all.scss +0 -66
  188. data/source/stylesheets/refills/_sliding-menu.scss +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96c9acd760ddbd40d94c82ebd9ace42b36a070a7
4
- data.tar.gz: b525e5d9fd76bc75ae908f964bf871cb59e562ac
3
+ metadata.gz: fbcf9786e52ff918c8307dfcb1710985f0c3ea4f
4
+ data.tar.gz: 43d5ef834a250929c73af2c3b1c544713797b503
5
5
  SHA512:
6
- metadata.gz: 3054c91575d1c057b5e9b856f36e4242a18fadf0fc56f75767c6f6b1da4b22b28b6d5095a402083841da3dbce596ecf7f349c8b3ce56cac4027b1ac0d70adc9e
7
- data.tar.gz: 00706dda998cc594b59f7e638f97176fa731c404e711cda98de44adb1cfbe0ba3fa3ca8c39ade8e253295836d416b1a55c65f4ecfaf40fff0de7b35238ae8cb9
6
+ metadata.gz: 73b4a0e3c6e9d317b6b89605062924497900dc563ae620e14aff7570b4939283fbade375e460d74bf985996a9de26d077b78821948cb2f0950c4e6f0750a1bda
7
+ data.tar.gz: 208752ecfecc62e75f20c728402837047255a7fec3cd4cce1a8aa136f28abffafb2d5d22f5acb1e5faef057b24f19945002692a3a28aebd8d357c6fd3be3961b
data/.hound.yml CHANGED
@@ -1,6 +1,7 @@
1
- scss:
2
- enabled: true
3
1
  java_script:
4
2
  enabled: true
5
3
  ruby:
6
4
  enabled: true
5
+ scss:
6
+ config_file: .scss-lint.yml
7
+ enabled: true
@@ -1 +1 @@
1
- 2.1.5
1
+ 2.3.0
@@ -1,18 +1,35 @@
1
+ # Up-to-date with SCSS-Lint v0.47
2
+
3
+ scss_files: "**/*.scss"
4
+
5
+ severity: warning
6
+
1
7
  linters:
2
8
  BangFormat:
3
9
  enabled: true
4
10
  space_before_bang: true
5
11
  space_after_bang: false
6
12
 
13
+ BemDepth:
14
+ enabled: false
15
+ max_elements: 1
16
+
7
17
  BorderZero:
18
+ enabled: true
19
+ convention: zero
20
+
21
+ ChainedClasses:
8
22
  enabled: false
9
23
 
10
24
  ColorKeyword:
11
- enabled: true
12
- severity: warning
25
+ enabled: false
26
+
27
+ ColorVariable:
28
+ enabled: false
13
29
 
14
30
  Comment:
15
31
  enabled: true
32
+ style: silent
16
33
 
17
34
  DebugStatement:
18
35
  enabled: true
@@ -20,6 +37,9 @@ linters:
20
37
  DeclarationOrder:
21
38
  enabled: true
22
39
 
40
+ DisableLinterReason:
41
+ enabled: false
42
+
23
43
  DuplicateProperty:
24
44
  enabled: true
25
45
 
@@ -34,22 +54,28 @@ linters:
34
54
  EmptyRule:
35
55
  enabled: true
36
56
 
57
+ ExtendDirective:
58
+ enabled: true
59
+
37
60
  FinalNewline:
38
61
  enabled: true
39
62
  present: true
40
63
 
41
64
  HexLength:
42
- enabled: false
65
+ enabled: true
43
66
  style: short
44
67
 
45
68
  HexNotation:
46
- enabled: true
69
+ enabled: false
47
70
  style: lowercase
48
71
 
49
72
  HexValidation:
50
73
  enabled: true
51
74
 
52
- IdWithExtraneousSelector:
75
+ IdSelector:
76
+ enabled: true
77
+
78
+ ImportantRule:
53
79
  enabled: true
54
80
 
55
81
  ImportPath:
@@ -59,6 +85,7 @@ linters:
59
85
 
60
86
  Indentation:
61
87
  enabled: true
88
+ allow_non_nested_indentation: false
62
89
  character: space
63
90
  width: 2
64
91
 
@@ -72,44 +99,71 @@ linters:
72
99
 
73
100
  NameFormat:
74
101
  enabled: true
102
+ allow_leading_underscore: true
75
103
  convention: hyphenated_lowercase
76
104
 
77
105
  NestingDepth:
78
106
  enabled: true
79
- max_depth: 4
80
- severity: warning
107
+ max_depth: 3
108
+ ignore_parent_selectors: false
81
109
 
82
110
  PlaceholderInExtend:
111
+ enabled: true
112
+
113
+ PrivateNamingConvention:
83
114
  enabled: false
115
+ prefix: _
116
+
117
+ PropertyCount:
118
+ enabled: false
119
+ include_nested: false
120
+ max_properties: 10
84
121
 
85
122
  PropertySortOrder:
86
123
  enabled: true
87
124
  ignore_unspecified: false
88
- severity: warning
125
+ min_properties: 2
126
+ separate_groups: false
89
127
 
90
128
  PropertySpelling:
91
129
  enabled: true
92
130
  extra_properties: []
131
+ disabled_properties: []
132
+
133
+ PropertyUnits:
134
+ enabled: true
135
+ global: [
136
+ 'ch', 'em', 'ex', 'rem',
137
+ 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q',
138
+ 'vh', 'vw', 'vmin', 'vmax',
139
+ 'deg', 'grad', 'rad', 'turn',
140
+ 'ms', 's',
141
+ 'Hz', 'kHz',
142
+ 'dpi', 'dpcm', 'dppx',
143
+ '%']
144
+ properties:
145
+ line-height: []
146
+
147
+ PseudoElement:
148
+ enabled: true
93
149
 
94
150
  QualifyingElement:
95
151
  enabled: true
96
- allow_with_attribute: false
97
- allow_with_class: false
98
- allow_with_id: false
99
- severity: warning
152
+ allow_element_with_attribute: false
153
+ allow_element_with_class: false
154
+ allow_element_with_id: false
100
155
 
101
156
  SelectorDepth:
102
157
  enabled: true
103
- max_depth: 2
104
- severity: warning
158
+ max_depth: 3
105
159
 
106
160
  SelectorFormat:
107
- enabled: true
108
- convention: hyphenated_lowercase
161
+ enabled: false
162
+ convention: hyphenated_BEM
109
163
 
110
164
  Shorthand:
111
165
  enabled: true
112
- severity: warning
166
+ allowed_shorthands: [1, 2, 3]
113
167
 
114
168
  SingleLinePerProperty:
115
169
  enabled: true
@@ -120,6 +174,7 @@ linters:
120
174
 
121
175
  SpaceAfterComma:
122
176
  enabled: true
177
+ style: one_space
123
178
 
124
179
  SpaceAfterPropertyColon:
125
180
  enabled: true
@@ -128,6 +183,17 @@ linters:
128
183
  SpaceAfterPropertyName:
129
184
  enabled: true
130
185
 
186
+ SpaceAfterVariableColon:
187
+ enabled: true
188
+ style: one_space
189
+
190
+ SpaceAfterVariableName:
191
+ enabled: true
192
+
193
+ SpaceAroundOperator:
194
+ enabled: true
195
+ style: one_space
196
+
131
197
  SpaceBeforeBrace:
132
198
  enabled: true
133
199
  style: space
@@ -144,8 +210,14 @@ linters:
144
210
  TrailingSemicolon:
145
211
  enabled: true
146
212
 
213
+ TrailingWhitespace:
214
+ enabled: true
215
+
147
216
  TrailingZero:
148
- enabled: false
217
+ enabled: true
218
+
219
+ TransitionAll:
220
+ enabled: true
149
221
 
150
222
  UnnecessaryMantissa:
151
223
  enabled: true
@@ -154,20 +226,21 @@ linters:
154
226
  enabled: true
155
227
 
156
228
  UrlFormat:
157
- enabled: true
229
+ enabled: false
158
230
 
159
231
  UrlQuotes:
160
232
  enabled: true
161
233
 
162
- VendorPrefixes:
234
+ VariableForProperty:
235
+ enabled: false
236
+ properties: []
237
+
238
+ VendorPrefix:
163
239
  enabled: true
164
- identifier_list: bourbon
165
- include: []
166
- exclude: []
240
+ identifier_list: base
167
241
 
168
242
  ZeroUnit:
169
243
  enabled: true
170
- severity: warning
171
244
 
172
245
  Compass::*:
173
246
  enabled: false
@@ -1,8 +1,9 @@
1
1
  # Contributing
2
2
 
3
- You are more than welcome to submit any component or pattern you can’t find in
4
- the library, or feel free to send requests for content youd like to see. When
5
- submitting a pull request, please think of these style guides:
3
+ We love pull requests from everyone. By participating in this project, you
4
+ agree to abide by the thoughtbot [code of conduct]. Heres a quick guide:
5
+
6
+ [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
6
7
 
7
8
  ## HTML.erb
8
9
 
data/Gemfile CHANGED
@@ -1,15 +1,18 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
- gem 'middleman'
3
+ ruby "2.3.0"
4
4
 
5
- gem 'bourbon', '~> 4.1.0'
6
- gem 'middleman-gh-pages'
7
- gem 'middleman-livereload', '~> 3.1.0'
8
- gem 'neat', '~> 1.7.0'
9
- gem 'sass', '~> 3.4.0'
5
+ gem "bourbon", "~> 5.0.0.beta.6"
6
+ gem "middleman", "~> 4.1"
7
+ gem "middleman-autoprefixer", "~> 2.7"
8
+ gem "middleman-gh-pages", "~> 0.3"
9
+ gem "middleman-livereload", "~> 3.4"
10
+ gem "middleman-sprockets", "= 4.0.0.rc.1"
11
+ gem "neat", "~> 1.7"
12
+ gem "sassc", "~> 1.8"
10
13
 
11
14
  group :test do
12
- gem 'rspec'
13
- gem "generator_spec", github: "stevehodgkiss/generator_spec", tag: "0.9.3"
14
- gem 'railties'
15
+ gem "generator_spec", "~> 0.9.3"
16
+ gem "railties"
17
+ gem "rspec"
15
18
  end
data/README.md CHANGED
@@ -1,19 +1,27 @@
1
1
  [![Refills](http://images.thoughtbot.com/bourbon/refills-logo.svg)](http://refills.bourbon.io)
2
2
 
3
- [![Gem Version](http://img.shields.io/gem/v/refills.svg?style=flat)](https://rubygems.org/gems/refills)
4
- [![Build Status](https://travis-ci.org/thoughtbot/refills.svg?branch=master)](https://travis-ci.org/thoughtbot/refills)
5
-
6
- ## Prepackaged patterns and components built with Bourbon and Neat
3
+ ## Components and patterns built with Bourbon and Neat
7
4
 
8
5
  - **[Examples & Code Snippets](http://refills.bourbon.io)**
9
6
  - **[Changelog](https://github.com/thoughtbot/refills/releases)**
10
7
  - **[Issues & Bugs](https://github.com/thoughtbot/refills/issues)**
11
8
 
9
+ Follow the [@bourbonsass](https://twitter.com/bourbonsass) Twitter account
10
+ for updates.
11
+
12
12
  ## Requirements
13
13
 
14
- - [Sass](https://github.com/sass/sass) 3.3+
15
- - [Bourbon](https://github.com/thoughtbot/bourbon) 4.0+
16
- - [Neat](https://github.com/thoughtbot/neat) 1.6+
14
+ - [Sass] 3.3+
15
+ - [Bourbon] 5.0+
16
+ - [Neat] 1.6+
17
+
18
+ It’s recommended that you use [Autoprefixer], as Refills do not come packaged
19
+ with vendor prefixes.
20
+
21
+ [Sass]: https://github.com/sass/sass
22
+ [Bourbon]: https://github.com/thoughtbot/bourbon
23
+ [Neat]: https://github.com/thoughtbot/neat
24
+ [Autoprefixer]: https://github.com/postcss/autoprefixer
17
25
 
18
26
  ## Installation
19
27
 
@@ -30,7 +38,7 @@ Alternative to copy-pasting manually, we also have a Refills gem that allows you
30
38
  1. Add Refills to your Gemfile:
31
39
 
32
40
  ```ruby
33
- gem 'refills'
41
+ gem "refills", group: :development
34
42
  ```
35
43
 
36
44
  2. Then run:
@@ -76,16 +84,24 @@ body {
76
84
  - [Bourbon](https://github.com/thoughtbot/bourbon): A simple and lightweight mixin library for Sass
77
85
  - [Neat](https://github.com/thoughtbot/neat): A lightweight semantic grid framework for Sass and Bourbon
78
86
  - [Bitters](https://github.com/thoughtbot/bitters): Scaffold styles, variables and structure for Bourbon projects
79
- - [Refills](https://github.com/thoughtbot/refills): Prepackaged patterns and components built with Bourbon, Neat and Bitters
80
-
81
- ## Credits
87
+ - [Refills](https://github.com/thoughtbot/refills): Components and patterns built with Bourbon and Neat
82
88
 
83
- [![thoughtbot](http://images.thoughtbot.com/bourbon/thoughtbot-logo.svg)](http://thoughtbot.com)
89
+ ## License
84
90
 
85
- Refills is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Tweet your questions or suggestions to [@bourbonsass](https://twitter.com/bourbonsass) and while you’re at it follow us too.
91
+ Copyright © 2014–2015 [thoughtbot, inc](http://thoughtbot.com). Refills is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
86
92
 
87
93
  Whenever code for Refills is borrowed or inspired by existing code, we try to credit the original developer/designer in our source code. [Let us know](mailto:design+bourbon@thoughtbot.com) if you think any credit is absent.
88
94
 
89
- ## License
95
+ ## About thoughtbot
90
96
 
91
- Copyright © 2014–2015 [thoughtbot, inc](http://thoughtbot.com). Refills is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
97
+ [<img src="http://thoughtbot.github.io/images/signature.svg" width="250" alt="thoughtbot logo">][hire]
98
+
99
+ Refills is maintained and funded by thoughtbot, inc.
100
+ The names and logos for thoughtbot are trademarks of thoughtbot, inc.
101
+
102
+ We love open source software!
103
+ See [our other projects][community]
104
+ or [hire us][hire] to design, develop, and grow your product.
105
+
106
+ [community]: https://thoughtbot.com/community?utm_source=github
107
+ [hire]: https://thoughtbot.com/hire-us?utm_source=github
@@ -0,0 +1,7 @@
1
+ general:
2
+ branches:
3
+ ignore:
4
+ - gh-pages
5
+ test:
6
+ override:
7
+ - bundle exec rake
data/config.rb CHANGED
@@ -1,18 +1,9 @@
1
- require 'erubis'
2
- require 'lib/snippet_helpers'
3
-
1
+ activate :autoprefixer
4
2
  activate :directory_indexes
5
3
 
6
- set :css_dir, 'stylesheets'
7
- set :images_dir, 'images'
8
- set :js_dir, 'javascripts'
9
-
10
- helpers SnippetHelpers
11
-
12
- ready do
13
- sprockets.append_path 'vendor/stylesheets'
14
- sprockets.append_path 'vendor/javascripts'
15
- end
4
+ set :css_dir, "stylesheets"
5
+ set :images_dir, "images"
6
+ set :js_dir, "javascripts"
16
7
 
17
8
  configure :development do
18
9
  activate :livereload
@@ -2,8 +2,9 @@ module SnippetHelpers
2
2
  SOURCE_DIR = File.expand_path('../../source', __FILE__)
3
3
 
4
4
  class Snippet
5
- def initialize(name)
5
+ def initialize(name, namespace: "")
6
6
  @name = name
7
+ @namespace = namespace
7
8
  end
8
9
 
9
10
  def path
@@ -12,12 +13,12 @@ module SnippetHelpers
12
13
 
13
14
  private
14
15
 
15
- attr_reader :name
16
+ attr_reader :name, :namespace
16
17
  end
17
18
 
18
19
  class HtmlSnippet < Snippet
19
20
  def path_segments
20
- [SOURCE_DIR, "_#{name.underscore}.html.erb"]
21
+ [SOURCE_DIR, namespace, "_#{name.underscore}.html.erb"]
21
22
  end
22
23
 
23
24
  def language
@@ -27,7 +28,7 @@ module SnippetHelpers
27
28
 
28
29
  class ScssSnippet < Snippet
29
30
  def path_segments
30
- [SOURCE_DIR, 'stylesheets', 'refills', "_#{name.dasherize}.scss"]
31
+ [SOURCE_DIR, "stylesheets", "refills", namespace, "_#{name.dasherize}.scss"]
31
32
  end
32
33
 
33
34
  def language
@@ -37,7 +38,7 @@ module SnippetHelpers
37
38
 
38
39
  class JavaScriptSnippet < Snippet
39
40
  def path_segments
40
- [SOURCE_DIR, 'javascripts', 'refills', "#{name.underscore}.js"]
41
+ [SOURCE_DIR, "javascripts", "refills", namespace, "#{name.underscore}.js"]
41
42
  end
42
43
 
43
44
  def language
@@ -52,6 +53,7 @@ module SnippetHelpers
52
53
  "javascripts",
53
54
  "refills",
54
55
  "coffeescript",
56
+ namespace,
55
57
  "#{name.underscore}.coffee"
56
58
  ]
57
59
  end
@@ -74,7 +76,13 @@ module SnippetHelpers
74
76
  JavaScriptSnippet,
75
77
  CoffeeScriptSnippet,
76
78
  ].map do |snippet_factory|
77
- render_snippet snippet_factory.new(name)
79
+ if name.include?("/")
80
+ *namespace, file = name.split("/")
81
+ else
82
+ namespace = []
83
+ file = name
84
+ end
85
+ render_snippet snippet_factory.new(file, namespace: namespace)
78
86
  end.join("\n")
79
87
  end
80
88