doggystyle 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.hound.yml +5 -0
  4. data/.npmignore +18 -0
  5. data/.ruby-version +1 -0
  6. data/.scss-lint.yml +243 -0
  7. data/.travis.yml +5 -0
  8. data/CHANGELOG.md +5 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +40 -0
  12. data/RELEASING.md +1 -0
  13. data/Rakefile +9 -0
  14. data/bin/doggystyle +5 -0
  15. data/bower.json +38 -0
  16. data/circle.yml +13 -0
  17. data/core/_imports.scss +229 -0
  18. data/core/animations/_jump.scss +7 -0
  19. data/core/animations/_shake.scss +24 -0
  20. data/core/animations/_wobble.scss +8 -0
  21. data/core/functions/_mobile-first.scss +3 -0
  22. data/core/functions/_opposite-direction.scss +45 -0
  23. data/core/functions/casts/_to-bool.scss +19 -0
  24. data/core/functions/casts/_to-color.scss +74 -0
  25. data/core/functions/casts/_to-list.scss +38 -0
  26. data/core/functions/casts/_to-map.scss +27 -0
  27. data/core/functions/casts/_to-null.scss +15 -0
  28. data/core/functions/casts/_to-number.scss +66 -0
  29. data/core/functions/casts/_to-string.scss +15 -0
  30. data/core/functions/colours/_colour-contrast.scss +61 -0
  31. data/core/functions/colours/_colour.scss +69 -0
  32. data/core/functions/colours/_random-colour.scss +78 -0
  33. data/core/functions/lists/_contains.scss +62 -0
  34. data/core/functions/lists/_first.scss +19 -0
  35. data/core/functions/lists/_insert-nth.scss +37 -0
  36. data/core/functions/lists/_last.scss +11 -0
  37. data/core/functions/lists/_merge.scss +30 -0
  38. data/core/functions/lists/_prepend.scss +11 -0
  39. data/core/functions/lists/_remove-nth.scss +53 -0
  40. data/core/functions/lists/_remove.scss +30 -0
  41. data/core/functions/lists/_replace-nth.scss +55 -0
  42. data/core/functions/lists/_replace.scss +36 -0
  43. data/core/functions/lists/_reverse.scss +31 -0
  44. data/core/functions/lists/_second.scss +19 -0
  45. data/core/functions/lists/_shift.scss +24 -0
  46. data/core/functions/lists/_slice.scss +52 -0
  47. data/core/functions/lists/_sort.scss +51 -0
  48. data/core/functions/maps/_map-deep-get.scss +51 -0
  49. data/core/functions/maps/_map-deep-set.scss +34 -0
  50. data/core/functions/maps/_map-depth.scss +23 -0
  51. data/core/functions/maps/_map-extend.scss +47 -0
  52. data/core/functions/maps/_map-has-keys.scss +23 -0
  53. data/core/functions/maps/_map-has-nested-keys.scss +24 -0
  54. data/core/functions/maps/_map-set.scss +4 -0
  55. data/core/functions/maps/_map-zip.scss +50 -0
  56. data/core/functions/numbers/_add-unit.scss +54 -0
  57. data/core/functions/numbers/_pad.scss +16 -0
  58. data/core/functions/numbers/_spacer.scss +16 -0
  59. data/core/functions/numbers/_strip.scss +29 -0
  60. data/core/functions/numbers/_units.scss +17 -0
  61. data/core/functions/svg/_dots.scss +84 -0
  62. data/core/functions/svg/_fake-radius.scss +131 -0
  63. data/core/functions/svg/_lines.scss +76 -0
  64. data/core/functions/svg/_svg.scss +12 -0
  65. data/core/functions/text/_smart-lineheight.scss +13 -0
  66. data/core/functions/text/_string-explode.scss +45 -0
  67. data/core/functions/text/_string-replace.scss +38 -0
  68. data/core/helpers/_custom-elements.scss +114 -0
  69. data/core/helpers/_eases.scss +44 -0
  70. data/core/helpers/_reset.scss +282 -0
  71. data/core/helpers/_show-breakpoints.scss +25 -0
  72. data/core/helpers/_strings.scss +648 -0
  73. data/core/helpers/_warnings.scss +3 -0
  74. data/core/helpers/checks/_check.scss +69 -0
  75. data/core/helpers/checks/_is-absolute-length.scss +25 -0
  76. data/core/helpers/checks/_is-angel.scss +25 -0
  77. data/core/helpers/checks/_is-arglist.scss +11 -0
  78. data/core/helpers/checks/_is-bool.scss +23 -0
  79. data/core/helpers/checks/_is-calc.scss +11 -0
  80. data/core/helpers/checks/_is-colour.scss +23 -0
  81. data/core/helpers/checks/_is-dark.scss +14 -0
  82. data/core/helpers/checks/_is-duration.scss +15 -0
  83. data/core/helpers/checks/_is-false.scss +13 -0
  84. data/core/helpers/checks/_is-first-character.scss +11 -0
  85. data/core/helpers/checks/_is-frequency.scss +15 -0
  86. data/core/helpers/checks/_is-function.scss +44 -0
  87. data/core/helpers/checks/_is-integer.scss +15 -0
  88. data/core/helpers/checks/_is-length.scss +16 -0
  89. data/core/helpers/checks/_is-light.scss +14 -0
  90. data/core/helpers/checks/_is-list.scss +11 -0
  91. data/core/helpers/checks/_is-map.scss +11 -0
  92. data/core/helpers/checks/_is-null.scss +11 -0
  93. data/core/helpers/checks/_is-number.scss +19 -0
  94. data/core/helpers/checks/_is-percentage.scss +13 -0
  95. data/core/helpers/checks/_is-position.scss +16 -0
  96. data/core/helpers/checks/_is-pseudo.scss +24 -0
  97. data/core/helpers/checks/_is-relative-length.scss +25 -0
  98. data/core/helpers/checks/_is-resolution.scss +15 -0
  99. data/core/helpers/checks/_is-selector.scss +3 -0
  100. data/core/helpers/checks/_is-string.scss +11 -0
  101. data/core/helpers/checks/_is-time.scss +15 -0
  102. data/core/helpers/checks/_is-unit.scss +16 -0
  103. data/core/helpers/private/_arglist-to-list.scss +36 -0
  104. data/core/helpers/private/_brightness.scss +13 -0
  105. data/core/helpers/private/_find-digits.scss +41 -0
  106. data/core/helpers/private/_find-integer.scss +40 -0
  107. data/core/helpers/private/_from-hex.scss +48 -0
  108. data/core/helpers/private/_from-hsl.scss +55 -0
  109. data/core/helpers/private/_from-rgb.scss +55 -0
  110. data/core/helpers/private/_get-color-value.scss +26 -0
  111. data/core/helpers/private/_hash-fix.scss +15 -0
  112. data/core/helpers/private/_hex-to-dec.scss +28 -0
  113. data/core/helpers/private/_length.scss +26 -0
  114. data/core/helpers/private/_lightness.scss +15 -0
  115. data/core/helpers/private/_list-items-to-strings.scss +8 -0
  116. data/core/helpers/private/_min-max-number.scss +12 -0
  117. data/core/helpers/private/_pow.scss +29 -0
  118. data/core/helpers/private/_string-compare.scss +38 -0
  119. data/core/helpers/private/_string-explode.scss +43 -0
  120. data/core/helpers/private/_sudo.scss +23 -0
  121. data/core/helpers/symbols/_arrows.scss +337 -0
  122. data/core/helpers/symbols/_block.scss +97 -0
  123. data/core/helpers/symbols/_box.scss +385 -0
  124. data/core/helpers/symbols/_common.scss +101 -0
  125. data/core/helpers/symbols/_currency.scss +82 -0
  126. data/core/helpers/symbols/_dingbats.scss +565 -0
  127. data/core/helpers/symbols/_geometric.scss +289 -0
  128. data/core/helpers/symbols/_letterlike.scss +235 -0
  129. data/core/helpers/symbols/_misc.scss +568 -0
  130. data/core/helpers/symbols/_operators.scss +766 -0
  131. data/core/helpers/symbols/_punctuation.scss +214 -0
  132. data/core/mixins/_align.scss +15 -0
  133. data/core/mixins/_animate.scss +16 -0
  134. data/core/mixins/_aspect-ratio.scss +86 -0
  135. data/core/mixins/_backface-visibility.scss +7 -0
  136. data/core/mixins/_background-image.scss +13 -0
  137. data/core/mixins/_blend.scss +10 -0
  138. data/core/mixins/_blendmodes.scss +24 -0
  139. data/core/mixins/_border-radius.scss +105 -0
  140. data/core/mixins/_browsers.scss +155 -0
  141. data/core/mixins/_bulletpoint.scss +12 -0
  142. data/core/mixins/_center.scss +3 -0
  143. data/core/mixins/_clearfix.scss +7 -0
  144. data/core/mixins/_columns.scss +22 -0
  145. data/core/mixins/_custom-property.scss +15 -0
  146. data/core/mixins/_devices.scss +97 -0
  147. data/core/mixins/_dropdown.scss +38 -0
  148. data/core/mixins/_fake-radius.scss +99 -0
  149. data/core/mixins/_filters.scss +163 -0
  150. data/core/mixins/_flip.scss +11 -0
  151. data/core/mixins/_font-face.scss +11 -0
  152. data/core/mixins/_fontsize.scss +126 -0
  153. data/core/mixins/_gallery.scss +134 -0
  154. data/core/mixins/_gradient.scss +72 -0
  155. data/core/mixins/_image-size.scss +18 -0
  156. data/core/mixins/_image.scss +12 -0
  157. data/core/mixins/_inputs.scss +18 -0
  158. data/core/mixins/_keyframes.scss +8 -0
  159. data/core/mixins/_last.scss +5 -0
  160. data/core/mixins/_nth-last.scss +7 -0
  161. data/core/mixins/_nth.scss +10 -0
  162. data/core/mixins/_placeholder.scss +15 -0
  163. data/core/mixins/_prefixer.scss +55 -0
  164. data/core/mixins/_selection.scss +15 -0
  165. data/core/mixins/_shadow.scss +7 -0
  166. data/core/mixins/_size.scss +13 -0
  167. data/core/mixins/_smart-horizontal.scss +21 -0
  168. data/core/mixins/_sudo-image.scss +12 -0
  169. data/core/mixins/_text-shadow.scss +30 -0
  170. data/core/mixins/_transforms.scss +264 -0
  171. data/core/mixins/_transition.scss +189 -0
  172. data/core/mixins/_triangle-classic.scss +170 -0
  173. data/core/mixins/_triangle.scss +250 -0
  174. data/core/mixins/_unwrap.scss +5 -0
  175. data/core/mixins/_user-select.scss +5 -0
  176. data/core/mixins/_vertical.scss +10 -0
  177. data/core/mixins/columns/_columns.scss +92 -0
  178. data/core/mixins/flexbox/_flex-container.scss +201 -0
  179. data/core/mixins/flexbox/_flex-grid.scss +235 -0
  180. data/core/mixins/flexbox/_flex-items.scss +140 -0
  181. data/core/mixins/flexbox/_flex-remove.scss +12 -0
  182. data/core/mixins/grid/_break-between.scss +6 -0
  183. data/core/mixins/grid/_grid.scss +150 -0
  184. data/core/mixins/svg/_svg-size.scss +4 -0
  185. data/core/mixins/svg/_svg.scss +9 -0
  186. data/core/placeholders/_clear.scss +27 -0
  187. data/core/placeholders/_cursor.scss +35 -0
  188. data/core/placeholders/_misc.scss +20 -0
  189. data/core/placeholders/_rendering.scss +21 -0
  190. data/core/placeholders/_text.scss +41 -0
  191. data/core/settings/_colours.scss +30 -0
  192. data/core/settings/_directories.scss +7 -0
  193. data/core/settings/_global.scss +14 -0
  194. data/core/settings/_grid.scss +24 -0
  195. data/core/settings/_padding.scss +8 -0
  196. data/core/settings/_spacing.scss +8 -0
  197. data/core/settings/_text.scss +13 -0
  198. data/doggystyle.gemspec +29 -0
  199. data/eyeglass-exports.js +7 -0
  200. data/features/install.feature +29 -0
  201. data/features/step_definitions/doggystyle_steps.rb +31 -0
  202. data/features/support/bourbon_support.rb +19 -0
  203. data/features/support/env.rb +1 -0
  204. data/features/update.feature +30 -0
  205. data/features/version.feature +5 -0
  206. data/index.js +7 -0
  207. data/lib/doggystyle.rb +7 -0
  208. data/lib/doggystyle/generator.rb +81 -0
  209. data/lib/doggystyle/version.rb +3 -0
  210. data/package.json +33 -0
  211. data/spec/doggystyle/library/border_color_spec.rb +51 -0
  212. data/spec/doggystyle/library/border_radius_spec.rb +25 -0
  213. data/spec/doggystyle/library/border_style_spec.rb +51 -0
  214. data/spec/doggystyle/library/border_width_spec.rb +51 -0
  215. data/spec/doggystyle/library/buttons_spec.rb +53 -0
  216. data/spec/doggystyle/library/clearfix_spec.rb +18 -0
  217. data/spec/doggystyle/library/contrast_switch_spec.rb +23 -0
  218. data/spec/doggystyle/library/ellipsis_spec.rb +20 -0
  219. data/spec/doggystyle/library/font_face_spec_1.rb +16 -0
  220. data/spec/doggystyle/library/font_face_spec_2.rb +21 -0
  221. data/spec/doggystyle/library/font_face_spec_3.rb +16 -0
  222. data/spec/doggystyle/library/font_face_spec_4.rb +17 -0
  223. data/spec/doggystyle/library/font_stacks_spec.rb +40 -0
  224. data/spec/doggystyle/library/hide_text_spec.rb +17 -0
  225. data/spec/doggystyle/library/hide_visually_spec.rb +35 -0
  226. data/spec/doggystyle/library/margin_spec.rb +51 -0
  227. data/spec/doggystyle/library/modular_scale_spec.rb +43 -0
  228. data/spec/doggystyle/library/padding_spec.rb +51 -0
  229. data/spec/doggystyle/library/position_spec.rb +67 -0
  230. data/spec/doggystyle/library/prefixer_spec.rb +34 -0
  231. data/spec/doggystyle/library/shade_spec.rb +31 -0
  232. data/spec/doggystyle/library/size_spec.rb +31 -0
  233. data/spec/doggystyle/library/strip_unit_spec.rb +31 -0
  234. data/spec/doggystyle/library/text_inputs_spec.rb +75 -0
  235. data/spec/doggystyle/library/tint_spec.rb +31 -0
  236. data/spec/doggystyle/library/triangle_spec.rb +31 -0
  237. data/spec/doggystyle/library/word_wrap_spec.rb +29 -0
  238. data/spec/doggystyle/utilities/assign_inputs_spec.rb +50 -0
  239. data/spec/doggystyle/utilities/collapse_directionals.rb +25 -0
  240. data/spec/doggystyle/utilities/directional_values_spec.rb +21 -0
  241. data/spec/doggystyle/utilities/font_source_declaration_spec.rb +29 -0
  242. data/spec/doggystyle/utilities/retrieve_bourbon_setting_spec.rb +31 -0
  243. data/spec/doggystyle/utilities/unpack_spec.rb +32 -0
  244. data/spec/doggystyle/validators/contains_spec.rb +27 -0
  245. data/spec/doggystyle/validators/is_length_spec.rb +49 -0
  246. data/spec/doggystyle/validators/is_light_spec.rb +37 -0
  247. data/spec/doggystyle/validators/is_number_spec.rb +43 -0
  248. data/spec/doggystyle/validators/is_size_spec.rb +43 -0
  249. data/spec/fixtures/_setup.scss +1 -0
  250. data/spec/fixtures/library/border-color.scss +26 -0
  251. data/spec/fixtures/library/border-radius.scss +17 -0
  252. data/spec/fixtures/library/border-style.scss +21 -0
  253. data/spec/fixtures/library/border-width.scss +21 -0
  254. data/spec/fixtures/library/buttons.scss +17 -0
  255. data/spec/fixtures/library/clearfix.scss +5 -0
  256. data/spec/fixtures/library/contrast-switch.scss +9 -0
  257. data/spec/fixtures/library/ellipsis.scss +5 -0
  258. data/spec/fixtures/library/font-face-1.scss +6 -0
  259. data/spec/fixtures/library/font-face-2.scss +10 -0
  260. data/spec/fixtures/library/font-face-3.scss +8 -0
  261. data/spec/fixtures/library/font-face-4.scss +7 -0
  262. data/spec/fixtures/library/font-stacks.scss +41 -0
  263. data/spec/fixtures/library/hide-text.scss +5 -0
  264. data/spec/fixtures/library/hide-visually.scss +9 -0
  265. data/spec/fixtures/library/margin.scss +21 -0
  266. data/spec/fixtures/library/modular-scale.scss +29 -0
  267. data/spec/fixtures/library/padding.scss +21 -0
  268. data/spec/fixtures/library/position.scss +25 -0
  269. data/spec/fixtures/library/prefixer.scss +13 -0
  270. data/spec/fixtures/library/shade.scss +17 -0
  271. data/spec/fixtures/library/size.scss +13 -0
  272. data/spec/fixtures/library/strip-unit.scss +17 -0
  273. data/spec/fixtures/library/text-inputs.scss +21 -0
  274. data/spec/fixtures/library/tint.scss +17 -0
  275. data/spec/fixtures/library/triangle.scss +9 -0
  276. data/spec/fixtures/library/word-wrap.scss +9 -0
  277. data/spec/fixtures/utilities/assign-inputs.scss +19 -0
  278. data/spec/fixtures/utilities/collapse-directionals.scss +17 -0
  279. data/spec/fixtures/utilities/directional-values.scss +13 -0
  280. data/spec/fixtures/utilities/font-source-declaration.scss +11 -0
  281. data/spec/fixtures/utilities/retrieve-bourbon-setting.scss +16 -0
  282. data/spec/fixtures/utilities/unpack.scss +17 -0
  283. data/spec/fixtures/validators/contains.scss +28 -0
  284. data/spec/fixtures/validators/is-length.scss +35 -0
  285. data/spec/fixtures/validators/is-light.scss +29 -0
  286. data/spec/fixtures/validators/is-number.scss +31 -0
  287. data/spec/fixtures/validators/is-size.scss +31 -0
  288. data/spec/spec_helper.rb +22 -0
  289. data/spec/support/matchers/have_rule.rb +35 -0
  290. data/spec/support/matchers/have_ruleset.rb +20 -0
  291. data/spec/support/matchers/have_value.rb +17 -0
  292. data/spec/support/parser_support.rb +16 -0
  293. data/spec/support/sass_support.rb +10 -0
  294. metadata +527 -0
@@ -0,0 +1,30 @@
1
+ // Basics
2
+ $red: #97080E !default;
3
+ $orange: #DA4B0F !default;
4
+ $yellow: #E9B104 !default;
5
+ $green: #488C13 !default;
6
+ $blue: #1B55C0 !default;
7
+ $pink: #E05D6B !default;
8
+ $purple: #613D5A !default;
9
+ $grey: #787878 !default;
10
+ $brown: #774F38 !default;
11
+ $white: #ffffff !default;
12
+ $black: #000000 !default;
13
+
14
+ // Social Networks
15
+ $facebook: #3b5998 !default;
16
+ $twitter: #00aced !default;
17
+ $google: #df5146 !default;
18
+ $youtube: #bb0000 !default;
19
+ $linkedin: #007bb6 !default;
20
+ $instagram: #517fa4 !default;
21
+ $pinterest: #cb2027 !default;
22
+ $vine: #00bf8f !default;
23
+ $snapchat: #fffc00 !default;
24
+ $flickr: #ff0084 !default;
25
+ $vimeo: #aad450 !default;
26
+
27
+ // Specials
28
+ $yello: #FFCB08 !default;
29
+ $selection: #B2D3FA !default;
30
+ $text: $black !default;
@@ -0,0 +1,7 @@
1
+ $image-url: "/assets/images/" !default;
2
+
3
+ $sprite-url: "/assets/images/sprites/" !default;
4
+
5
+ $font-url : "/assets/fonts/" !default;
6
+
7
+ $icon-url : "/assets/icons/" !default;
@@ -0,0 +1,14 @@
1
+ // Shorthand for !important
2
+ $imp:!important;
3
+
4
+ // Allow wanring messages to be displayed (For Developers)
5
+ $warnings: true !default;
6
+
7
+ // When enabled, the page will include a variety of 'normaliser' settings
8
+ $reset : true !default;
9
+
10
+ // Default globals
11
+ $border-radius : 10 !default;
12
+
13
+ // Default units
14
+ $default-unit : px !default;
@@ -0,0 +1,24 @@
1
+ // Neat
2
+ $visual-grid: false !global;
3
+ $column: 90px !global;
4
+ $gutter: 0px !global;
5
+ $grid-columns: 12 !global;
6
+
7
+ // Global
8
+ $mobile-first: false !default;
9
+ $breakpoints: () !default;
10
+
11
+ $max: 1440 !default;
12
+ $min: 320 !default;
13
+
14
+ $max-width: addUnit($max);
15
+ $min-width: addUnit($min);
16
+
17
+ $maximum: $max-width;
18
+ $minimum: $min-width;
19
+
20
+ $small: 480 !default;
21
+ $large: 1080 !default;
22
+ $medium: (($large - $small) / 2) + $small !default; // 780
23
+
24
+ $show-breakpoints : false !default;
@@ -0,0 +1,8 @@
1
+ $padding: 16 !default;
2
+ $pad: pad(1) !default;
3
+ $pad0: pad(0) !default;
4
+ $pad1: addUnit($pad) !default;
5
+ $pad2: pad(2) !default;
6
+ $pad3: pad(3) !default;
7
+ $pad4: pad(4) !default;
8
+ $pad5: pad(5) !default;
@@ -0,0 +1,8 @@
1
+ $spacing: 5 !default;
2
+ $spacer: spacer(1) !default;
3
+ $spacer0: spacer(0) !default;
4
+ $spacer1: addUnit($spacing, vh) !default;
5
+ $spacer2: spacer(2) !default;
6
+ $spacer3: spacer(3) !default;
7
+ $spacer4: spacer(4) !default;
8
+ $spacer5: spacer(5) !default;
@@ -0,0 +1,13 @@
1
+ $global-line-height-guide : 80;
2
+
3
+ $font-size: 16 !default;
4
+
5
+ $size: addUnit($font-size) !default;
6
+ $fs: $size !default;
7
+
8
+ $h1: ($font-size*2.5) !default; // 40px
9
+ $h2: (($h1 - $font-size) / 2) + $font-size !default; // 28px
10
+ $h3: (($h2 - $font-size) / 2) + $font-size !default; // 22px
11
+ $h4: (($h3 - $font-size) / 2) + $font-size !default; // 19px
12
+ $h5: (($h4 - $font-size) / 2) + $font-size !default; // 17.5px
13
+ $h6: (($h5 - $font-size) / 2) + $font-size !default; // 16.75px
@@ -0,0 +1,29 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "doggystyle/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.add_development_dependency "aruba", "~> 0.6.2"
6
+ s.add_development_dependency "css_parser", "~> 1.4.1"
7
+ s.add_development_dependency "rake", "~> 11.1.2"
8
+ s.add_development_dependency "rspec", "~> 3.4.0"
9
+ s.add_development_dependency "scss_lint", "0.48.0"
10
+ s.add_runtime_dependency "sass", "~> 3.4.22"
11
+ s.add_runtime_dependency "thor", "~> 0.19.1"
12
+ s.authors = "Mark Notton"
13
+ s.description = <<-DESC
14
+ A collection of Sass resources found from an array of sources, forums, and tutorials.
15
+ Many of my own mixins and functions have been writen to take advantage of
16
+ Sass lists and maps, allowing users to enter settings without strict ordering.
17
+ DESC
18
+ s.email = "mark@marknotton.uk"
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.files = `git ls-files`.split("\n")
21
+ s.homepage = "http://doggystyle.io"
22
+ s.license = "MIT"
23
+ s.name = "doggystyle"
24
+ s.platform = Gem::Platform::RUBY
25
+ s.require_paths = ["lib"]
26
+ s.summary = "A collection of Sass resources found from an array of sources, forums, and tutorials."
27
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
+ s.version = Doggystyle::VERSION
29
+ end
@@ -0,0 +1,7 @@
1
+ var doggystyle = require("./index");
2
+
3
+ module.exports = function(eyeglass, sass) {
4
+ return {
5
+ sassDir: doggystyle.includePaths[0]
6
+ };
7
+ };
@@ -0,0 +1,29 @@
1
+ @disable-bundler
2
+ Feature: Install doggystyle files
3
+
4
+ Scenario: Doggystyle generates a new doggystyle installation
5
+ When I run `bundle exec doggystyle install`
6
+ Then the sass directories should have been generated
7
+ And the following directories should exist:
8
+ | doggystyle |
9
+ And the master doggystyle partial should have been generated
10
+ And the output should contain "Doggystyle files installed to doggystyle/"
11
+
12
+ Scenario: Generating does not overwrite an existing doggystyle directory
13
+ Given doggystyle is already installed
14
+ When I run `bundle exec doggystyle install`
15
+ Then the output should contain "Doggystyle files already installed, doing nothing."
16
+
17
+ Scenario: Install Doggystyle into a custom path
18
+ When I run `bundle exec doggystyle install --path=custom_path`
19
+ Then the sass directories with "custom_path" prefix should have been generated
20
+ And the following directories should exist:
21
+ | custom_path/doggystyle |
22
+ And the master doggystyle partial should have been generated within "custom_path" directory
23
+ And the output should contain "Doggystyle files installed to custom_path/doggystyle/"
24
+
25
+ Scenario: Forcing install of doggystyle
26
+ Given doggystyle is already installed
27
+ When I run `bundle exec doggystyle install --force`
28
+ Then the output from "bundle exec doggystyle install --force" should contain "Doggystyle files installed to doggystyle/"
29
+ And the output should not contain "Doggystyle files already installed, doing nothing."
@@ -0,0 +1,31 @@
1
+ Given /^doggystyle is already installed$/ do
2
+ install_doggystyle
3
+ end
4
+
5
+ Given /^I install doggystyle to "([^"]*)"$/ do |path|
6
+ end
7
+
8
+ Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
9
+ sass_directories = [
10
+ "animations",
11
+ "functions",
12
+ "helpers",
13
+ "mixins",
14
+ "placeholders",
15
+ "settings"
16
+ ]
17
+ sass_directories.map!{ |directory| doggystyle_path(prefix, directory) }
18
+ check_directory_presence(sass_directories, true)
19
+ end
20
+
21
+ Then /^the master doggystyle partial should have been generated(?: within "([^"]+)" directory)?$/ do |prefix|
22
+ check_file_presence([doggystyle_path(prefix, '_import.scss')], true)
23
+ end
24
+
25
+ Then /^doggystyle should not have been generated$/ do
26
+ check_directory_presence(['doggystyle'], false)
27
+ end
28
+
29
+ Then /^the output should contain the current version of Doggystyle$/ do
30
+ assert_exact_output("Doggystyle #{Bourbon::VERSION}\n", all_output)
31
+ end
@@ -0,0 +1,19 @@
1
+ module DoggystyleSupport
2
+ def install_doggystyle(path = nil)
3
+ if path
4
+ run_simple("bundle exec doggystyle install --path '#{path}'")
5
+ else
6
+ run_simple("bundle exec doggystyle install")
7
+ end
8
+ end
9
+
10
+ def doggystyle_path(prefix, path)
11
+ if prefix
12
+ File.join(prefix, 'doggystyle', path)
13
+ else
14
+ File.join('doggystyle', path)
15
+ end
16
+ end
17
+ end
18
+
19
+ World(DoggystyleSupport)
@@ -0,0 +1 @@
1
+ require "aruba/cucumber"
@@ -0,0 +1,30 @@
1
+ @disable-bundler
2
+ Feature: Update doggystyle files
3
+
4
+ Scenario: Updating updates an existing doggystyle install
5
+ Given doggystyle is already installed
6
+ When I write to "doggystyle/_doggystyle.scss" with:
7
+ """
8
+ foobar
9
+ """
10
+ And I run `bundle exec doggystyle update`
11
+ Then the output should contain "Doggystyle files updated."
12
+ And the file "doggystyle/_doggystyle.scss" should not contain "foobar"
13
+
14
+ Scenario: Updating with a --path option
15
+ Given I install doggystyle to "custom_path"
16
+ When I write to "custom_path/doggystyle/_doggystyle.scss" with:
17
+ """
18
+ foobar
19
+ """
20
+ And I run `bundle exec doggystyle update`
21
+ Then the output should contain "No existing doggystyle installation. Doing nothing."
22
+
23
+ When I run `bundle exec doggystyle update --path custom_path`
24
+ Then the output should contain "Doggystyle files updated."
25
+ And the file "custom_path/doggystyle/_doggystyle.scss" should not contain "foobar"
26
+
27
+ Scenario: Updating does not generate a new doggystyle install
28
+ And I run `bundle exec doggystyle update`
29
+ Then doggystyle should not have been generated
30
+ And the output should contain "No existing doggystyle installation. Doing nothing."
@@ -0,0 +1,5 @@
1
+ @disable-bundler
2
+ Feature: Show version
3
+ Scenario: Viewing version
4
+ When I successfully run `bundle exec doggystyle --version`
5
+ Then the output should contain the current version of Doggystyle
data/index.js ADDED
@@ -0,0 +1,7 @@
1
+ var path = require("path");
2
+
3
+ module.exports = {
4
+ includePaths: [
5
+ path.join(__dirname, "core")
6
+ ]
7
+ };
data/lib/doggystyle.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "doggystyle/generator"
2
+
3
+ doggystyle_path = File.expand_path("../../core", __FILE__)
4
+ ENV["SASS_PATH"] = [
5
+ ENV["SASS_PATH"],
6
+ doggystyle_path,
7
+ ].compact.join(File::PATH_SEPARATOR)
@@ -0,0 +1,81 @@
1
+ require "doggystyle/version"
2
+ require "fileutils"
3
+ require "thor"
4
+ require "pathname"
5
+
6
+ module Doggystyle
7
+ class Generator < Thor
8
+ map ["-v", "--version"] => :version
9
+
10
+ desc "install", "Install Doggystyle into your project"
11
+ method_options :path => :string, :force => :boolean
12
+ def install
13
+ if doggystyle_files_already_exist? && !options[:force]
14
+ puts "Doggystyle files already installed, doing nothing."
15
+ else
16
+ install_files
17
+ puts "Doggystyle files installed to #{install_path}/"
18
+ end
19
+ end
20
+
21
+ desc "update", "Update Doggystyle"
22
+ method_options :path => :string
23
+ def update
24
+ if doggystyle_files_already_exist?
25
+ remove_doggystyle_directory
26
+ install_files
27
+ puts "Doggystyle files updated."
28
+ else
29
+ puts "No existing doggystyle installation. Doing nothing."
30
+ end
31
+ end
32
+
33
+ desc "version", "Show Doggystyle version"
34
+ def version
35
+ say "Doggystyle #{Doggystyle::VERSION}"
36
+ end
37
+
38
+ private
39
+
40
+ def doggystyle_files_already_exist?
41
+ install_path.exist?
42
+ end
43
+
44
+ def install_path
45
+ @install_path ||= if options[:path]
46
+ Pathname.new(File.join(options[:path], "doggystyle"))
47
+ else
48
+ Pathname.new("doggystyle")
49
+ end
50
+ end
51
+
52
+ def install_files
53
+ make_install_directory
54
+ copy_in_scss_files
55
+ end
56
+
57
+ def remove_doggystyle_directory
58
+ FileUtils.rm_rf("doggystyle")
59
+ end
60
+
61
+ def make_install_directory
62
+ FileUtils.mkdir_p(install_path)
63
+ end
64
+
65
+ def copy_in_scss_files
66
+ FileUtils.cp_r(all_stylesheets, install_path)
67
+ end
68
+
69
+ def all_stylesheets
70
+ Dir["#{stylesheets_directory}/*"]
71
+ end
72
+
73
+ def stylesheets_directory
74
+ File.join(top_level_directory, "core")
75
+ end
76
+
77
+ def top_level_directory
78
+ File.dirname(File.dirname(File.dirname(__FILE__)))
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,3 @@
1
+ module Doggystyle
2
+ VERSION = "0.1.0"
3
+ end
data/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "author": {
3
+ "name": "marknotton",
4
+ "url": "http://marknotton.uk"
5
+ },
6
+ "bugs": {
7
+ "url": "https://github.com/marknotton/doggystyle/issues"
8
+ },
9
+ "description": "A collection of Sass resources found from an array of sources, forums, and tutorials.",
10
+ "eyeglass": {
11
+ "needs": "*",
12
+ "exports": "eyeglass-exports.js"
13
+ },
14
+ "homepage": "https://github.com/marknotton/doggystyle",
15
+ "keywords": [
16
+ "css",
17
+ "eyeglass-module",
18
+ "mixins",
19
+ "sass",
20
+ "scss"
21
+ ],
22
+ "license": "MIT",
23
+ "main": "index.js",
24
+ "name": "doggystyle",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/marknotton/doggystyle.git"
28
+ },
29
+ "scripts": {
30
+ "test": "bundle exec rake"
31
+ },
32
+ "version": "0.1.0"
33
+ }
@@ -0,0 +1,51 @@
1
+ require "spec_helper"
2
+
3
+ describe "border-color" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("library/border-color")
6
+ end
7
+
8
+ context "called with one color" do
9
+ it "applies same color to all sides" do
10
+ rule = "border-color: #f00"
11
+
12
+ expect(".border-color-all").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with two colors" do
17
+ it "applies to alternating sides" do
18
+ rule = "border-color: #0f0 #00f"
19
+
20
+ expect(".border-color-alternate").to have_rule(rule)
21
+ end
22
+ end
23
+
24
+ context "called with three colors" do
25
+ it "applies second color to left and right" do
26
+ rule = "border-color: #f00 #0f0 #00f"
27
+
28
+ expect(".border-color-implied-left").to have_rule(rule)
29
+ end
30
+ end
31
+
32
+ context "called with four colors" do
33
+ it "applies different colors to all sides" do
34
+ rule = "border-color: #00f #0f0 #f00 #ff0"
35
+
36
+ expect(".border-color-explicit").to have_rule(rule)
37
+ end
38
+ end
39
+
40
+ context "called with null values" do
41
+ it "writes rules for other three" do
42
+ ruleset = "border-top-color: #0f0; " +
43
+ "border-right-color: #ff0; " +
44
+ "border-left-color: #00f;"
45
+ bad_rule = "border-bottom-color: null;"
46
+
47
+ expect(".border-color-false-third").to have_ruleset(ruleset)
48
+ expect(".border-color-false-third").to_not have_rule(bad_rule)
49
+ end
50
+ end
51
+ end