archetype 0.0.1.pre.3.f9dde24 → 0.0.1.pre.3.90263a7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/bin/archetype +3 -0
  3. data/lib/archetype/actions/help.rb +16 -0
  4. data/lib/archetype/actions/theme.rb +73 -0
  5. data/lib/archetype/executor.rb +27 -0
  6. data/lib/archetype/functions/helpers.rb +49 -9
  7. data/lib/archetype/functions/styleguide_memoizer.rb +9 -1
  8. data/lib/archetype/sass_extensions.rb +1 -0
  9. data/lib/archetype/sass_extensions/functions/styleguide.rb +104 -27
  10. data/lib/archetype/sass_extensions/monkey_patches.rb +3 -0
  11. data/lib/archetype/sass_extensions/monkey_patches/handle_include_loop.rb +41 -0
  12. data/stylesheets/archetype/_base.scss +3 -0
  13. data/stylesheets/archetype/_config.scss +5 -1
  14. data/stylesheets/archetype/_hacks.scss +24 -4
  15. data/stylesheets/archetype/_ui.scss +23 -2
  16. data/stylesheets/archetype/base/_h5bp.scss +12 -12
  17. data/stylesheets/archetype/base/_normalize.scss +178 -139
  18. data/stylesheets/archetype/styleguide/_helpers.scss +1 -4
  19. data/stylesheets/archetype/styleguide/components/_alerts.scss +1 -1
  20. data/stylesheets/archetype/styleguide/components/_buttons.scss +6 -6
  21. data/stylesheets/archetype/styleguide/components/_closes.scss +2 -2
  22. data/stylesheets/archetype/util/_styles.scss +18 -3
  23. data/stylesheets/archetype/util/_targeting.scss +2 -0
  24. data/templates/_theme/_components.scss +3 -0
  25. data/templates/_theme/_config.scss +1 -0
  26. data/templates/_theme/_core.scss +13 -0
  27. data/templates/_theme/_helpers.scss +1 -0
  28. data/templates/_theme/_primitives.scss +3 -0
  29. data/templates/_theme/components/README +1 -0
  30. data/templates/_theme/primitives/README +1 -0
  31. data/test/fixtures/stylesheets/archetype/expected/styleguide/alerts.css +675 -0
  32. data/test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css +18 -18
  33. data/test/fixtures/stylesheets/archetype/expected/styleguide/drop.css +63 -0
  34. data/test/fixtures/stylesheets/archetype/expected/styleguide/invalid_structures.css +21 -0
  35. data/test/fixtures/stylesheets/archetype/expected/styleguide/multi_value.css +13 -0
  36. data/test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css +52 -9
  37. data/test/fixtures/stylesheets/archetype/expected/utilities/targeting/target-browser.css +5 -0
  38. data/test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss +21 -0
  39. data/test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss +1 -1
  40. data/test/fixtures/stylesheets/archetype/source/styleguide/drop.scss +101 -0
  41. data/test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss +1 -1
  42. data/test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss +85 -0
  43. data/test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss +18 -0
  44. data/test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss +1 -1
  45. data/test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss +1 -1
  46. data/test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss +10 -0
  47. data/test/fixtures/stylesheets/archetype/source/utilities/targeting/target-browser.scss +8 -1
  48. metadata +33 -5
  49. data/test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png +0 -0
@@ -1,6 +1,6 @@
1
1
  // this case verifies that you can define `fallback` css properties
2
2
 
3
- @import "archetype";
3
+ @import "archetype";
4
4
 
5
5
  @if not styleguide-component-exists(fallback-styleguide-test, $CONFIG_THEME) {
6
6
  $a-blackhole: styleguide-add-component(fallback-styleguide-test, (), (
@@ -0,0 +1,85 @@
1
+ @import "archetype";
2
+
3
+ // this should throw a warning because we can't retrieve the key-value pairs for the top level
4
+ @if not styleguide-component-exists(test-missing-nil, $CONFIG_THEME) {
5
+ $a-blackhole: styleguide-add-component(test-missing-nil, (), (
6
+ (default, (
7
+ color red,
8
+ nil
9
+ ))
10
+ // missing nil
11
+ ), $CONFIG_THEME);
12
+ }
13
+
14
+ // this should still throw a warning because we can't retrieve the key-value pairs for the properties
15
+ @if not styleguide-component-exists(test-missing-nil-2, $CONFIG_THEME) {
16
+ $a-blackhole: styleguide-add-component(test-missing-nil-2, (), (
17
+ (default, (
18
+ color yellow
19
+ // missing nil
20
+ )),
21
+ nil
22
+ ), $CONFIG_THEME);
23
+ }
24
+
25
+ // this should still throw a warning because we can't retrieve the key-value pairs for the properties
26
+ @if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) {
27
+ $a-blackhole: styleguide-add-component(test-missing-nil-3, (), (
28
+ (default, (
29
+ color blue,
30
+ (states, (
31
+ (hover, (
32
+ color black,
33
+ background green,
34
+ font-weight bold
35
+ ))
36
+ ))
37
+ )),
38
+ nil
39
+ ), $CONFIG_THEME);
40
+ }
41
+
42
+ // this should throw a warning because we probably forgot a comma somewhere
43
+ @if not styleguide-component-exists(test-missing-comma, $CONFIG_THEME) {
44
+ $a-blackhole: styleguide-add-component(test-missing-comma, (), (
45
+ (default, (
46
+ color white,
47
+ background green // missing comma
48
+ (states, (
49
+ (hover, (
50
+ color black,
51
+ background green,
52
+ font-weight bold
53
+ )),
54
+ nil
55
+ ))
56
+ )),
57
+ nil
58
+ ), $CONFIG_THEME);
59
+ }
60
+
61
+ // this should throw a warning because we used an empty value for a property
62
+ @if not styleguide-component-exists(test-empty-value, $CONFIG_THEME) {
63
+ $a-blackhole: styleguide-add-component(test-empty-value, (), (
64
+ (default, (
65
+ color // this is ambiguous, but shouldn't cause an error
66
+ )),
67
+ nil
68
+ ), $CONFIG_THEME);
69
+ }
70
+
71
+ .test-missing-nil {
72
+ @include styleguide(test-missing-nil);
73
+ }
74
+ .test-missing-nil-2 {
75
+ @include styleguide(test-missing-nil-2);
76
+ }
77
+ .test-missing-nil-3 {
78
+ @include styleguide(test-missing-nil-3);
79
+ }
80
+ .test-missing-comma {
81
+ @include styleguide(test-missing-comma);
82
+ }
83
+ .test-empty-value {
84
+ @include styleguide(test-empty-value);
85
+ }
@@ -0,0 +1,18 @@
1
+ @import "archetype";
2
+
3
+ @if not styleguide-component-exists(multi-value-styleguide-test, $CONFIG_THEME) {
4
+ $a-blackhole: styleguide-add-component(multi-value-styleguide-test, (), (
5
+ (default, (
6
+ color gray,
7
+ color rgba(0,0,0, 0.7),
8
+ background white,
9
+ background transparent,
10
+ target-browser (ie lte 7, color, blue),
11
+ target-browser (ie 8, color, red),
12
+ target-browser (firefox, color, pink)
13
+ ))
14
+ ), $CONFIG_THEME);
15
+ }
16
+ .multi-value-styleguide-test {
17
+ @include styleguide(multi-value-styleguide-test);
18
+ }
@@ -3,7 +3,7 @@
3
3
  // - nested selectors
4
4
  // - nested `styleguide` calls in nested selectors
5
5
 
6
- @import "archetype";
6
+ @import "archetype";
7
7
 
8
8
  @if not styleguide-component-exists(nested-styleguide-test, $CONFIG_THEME) {
9
9
  $a-blackhole: styleguide-add-component(nested-styleguide-test, (), (
@@ -1,4 +1,4 @@
1
- @import "archetype";
1
+ @import "archetype";
2
2
 
3
3
  .simple-button {
4
4
  &.disabled {
@@ -1,5 +1,7 @@
1
1
  @import "archetype";
2
2
 
3
+ @include base-glyph();
4
+
3
5
  .simple {
4
6
  @include glyph-icon(caret-down);
5
7
  }
@@ -22,4 +24,12 @@ $CONFIG_GENERATED_TAG_INLINE: false;
22
24
  #{$archetype-glyph-selector} {
23
25
  color: pink;
24
26
  }
27
+ }
28
+
29
+ .content-block {
30
+ @include glyph-icon(caret-down) {
31
+ position: absolute;
32
+ top: 10px;
33
+ left: 10px;
34
+ }
25
35
  }
@@ -43,7 +43,7 @@
43
43
 
44
44
  .target-ie-lte-9 {
45
45
  @include target-browser(ie lte 9, border-color, #111);
46
- @include target-browser(ie lte 9, background, #2c2c2b);
46
+ @include target-browser(ie lte 9, background, #2c2c2b);
47
47
  }
48
48
 
49
49
  .target-ie-7-8-9 {
@@ -68,3 +68,10 @@
68
68
  .target-opera {
69
69
  @include target-browser(opera, width, 82%);
70
70
  }
71
+
72
+ .target-with-content-block {
73
+ @include target-browser(ie lte 8) {
74
+ /* testing content block */
75
+ color: red;
76
+ };
77
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archetype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.3.f9dde24
4
+ version: 0.0.1.pre.3.90263a7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene ONeill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-26 00:00:00.000000000 Z
12
+ date: 2013-08-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: compass
@@ -56,7 +56,8 @@ dependencies:
56
56
  description: UI Pattern and component library for quickly iterating on and maintaining
57
57
  scalable web interfaces
58
58
  email: oneill.eugene@gmail.com
59
- executables: []
59
+ executables:
60
+ - archetype
60
61
  extensions: []
61
62
  extra_rdoc_files: []
62
63
  files:
@@ -64,6 +65,10 @@ files:
64
65
  - README.md
65
66
  - CHANGELOG.md
66
67
  - VERSION.yml
68
+ - bin/archetype
69
+ - lib/archetype/actions/help.rb
70
+ - lib/archetype/actions/theme.rb
71
+ - lib/archetype/executor.rb
67
72
  - lib/archetype/functions/hash.rb
68
73
  - lib/archetype/functions/helpers.rb
69
74
  - lib/archetype/functions/styleguide_memoizer.rb
@@ -76,6 +81,8 @@ files:
76
81
  - lib/archetype/sass_extensions/functions/ui.rb
77
82
  - lib/archetype/sass_extensions/functions/version.rb
78
83
  - lib/archetype/sass_extensions/functions.rb
84
+ - lib/archetype/sass_extensions/monkey_patches/handle_include_loop.rb
85
+ - lib/archetype/sass_extensions/monkey_patches.rb
79
86
  - lib/archetype/sass_extensions.rb
80
87
  - lib/archetype/version.rb
81
88
  - lib/archetype.rb
@@ -140,6 +147,13 @@ files:
140
147
  - stylesheets/archetype/util/_styles.scss
141
148
  - stylesheets/archetype/util/_targeting.scss
142
149
  - stylesheets/archetype/util/_units.scss
150
+ - templates/_theme/_components.scss
151
+ - templates/_theme/_config.scss
152
+ - templates/_theme/_core.scss
153
+ - templates/_theme/_helpers.scss
154
+ - templates/_theme/_primitives.scss
155
+ - templates/_theme/components/README
156
+ - templates/_theme/primitives/README
143
157
  - templates/example/index.html
144
158
  - templates/example/manifest.rb
145
159
  - templates/example/screen.scss
@@ -193,7 +207,6 @@ files:
193
207
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png
194
208
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png
195
209
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png
196
- - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png
197
210
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png
198
211
  - test/fixtures/stylesheets/archetype/config.rb
199
212
  - test/fixtures/stylesheets/archetype/expected/b.css
@@ -201,9 +214,13 @@ files:
201
214
  - test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css
202
215
  - test/fixtures/stylesheets/archetype/expected/hacks/transparent_focusable.css
203
216
  - test/fixtures/stylesheets/archetype/expected/locale.css
217
+ - test/fixtures/stylesheets/archetype/expected/styleguide/alerts.css
204
218
  - test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css
219
+ - test/fixtures/stylesheets/archetype/expected/styleguide/drop.css
205
220
  - test/fixtures/stylesheets/archetype/expected/styleguide/extend.css
206
221
  - test/fixtures/stylesheets/archetype/expected/styleguide/fallback_styles.css
222
+ - test/fixtures/stylesheets/archetype/expected/styleguide/invalid_structures.css
223
+ - test/fixtures/stylesheets/archetype/expected/styleguide/multi_value.css
207
224
  - test/fixtures/stylesheets/archetype/expected/styleguide/nested_styleguides.css
208
225
  - test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css
209
226
  - test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css
@@ -225,9 +242,13 @@ files:
225
242
  - test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss
226
243
  - test/fixtures/stylesheets/archetype/source/hacks/transparent_focusable.scss
227
244
  - test/fixtures/stylesheets/archetype/source/locale.scss
245
+ - test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss
228
246
  - test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss
247
+ - test/fixtures/stylesheets/archetype/source/styleguide/drop.scss
229
248
  - test/fixtures/stylesheets/archetype/source/styleguide/extend.scss
230
249
  - test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss
250
+ - test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss
251
+ - test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss
231
252
  - test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss
232
253
  - test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss
233
254
  - test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss
@@ -291,7 +312,6 @@ test_files:
291
312
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark.png
292
313
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_dark_static.png
293
314
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders/small/small_static.png
294
- - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/animations/loaders-s7889ccc8c1.png
295
315
  - test/fixtures/stylesheets/archetype/assets/images/vendor/archetype/sprites/hovercard_tip.png
296
316
  - test/fixtures/stylesheets/archetype/config.rb
297
317
  - test/fixtures/stylesheets/archetype/expected/b.css
@@ -299,9 +319,13 @@ test_files:
299
319
  - test/fixtures/stylesheets/archetype/expected/hacks/ie_pseudo.css
300
320
  - test/fixtures/stylesheets/archetype/expected/hacks/transparent_focusable.css
301
321
  - test/fixtures/stylesheets/archetype/expected/locale.css
322
+ - test/fixtures/stylesheets/archetype/expected/styleguide/alerts.css
302
323
  - test/fixtures/stylesheets/archetype/expected/styleguide/buttons.css
324
+ - test/fixtures/stylesheets/archetype/expected/styleguide/drop.css
303
325
  - test/fixtures/stylesheets/archetype/expected/styleguide/extend.css
304
326
  - test/fixtures/stylesheets/archetype/expected/styleguide/fallback_styles.css
327
+ - test/fixtures/stylesheets/archetype/expected/styleguide/invalid_structures.css
328
+ - test/fixtures/stylesheets/archetype/expected/styleguide/multi_value.css
305
329
  - test/fixtures/stylesheets/archetype/expected/styleguide/nested_styleguides.css
306
330
  - test/fixtures/stylesheets/archetype/expected/styleguide/selective_state.css
307
331
  - test/fixtures/stylesheets/archetype/expected/ui/glyph_icon.css
@@ -323,9 +347,13 @@ test_files:
323
347
  - test/fixtures/stylesheets/archetype/source/hacks/ie_pseudo.scss
324
348
  - test/fixtures/stylesheets/archetype/source/hacks/transparent_focusable.scss
325
349
  - test/fixtures/stylesheets/archetype/source/locale.scss
350
+ - test/fixtures/stylesheets/archetype/source/styleguide/alerts.scss
326
351
  - test/fixtures/stylesheets/archetype/source/styleguide/buttons.scss
352
+ - test/fixtures/stylesheets/archetype/source/styleguide/drop.scss
327
353
  - test/fixtures/stylesheets/archetype/source/styleguide/extend.scss
328
354
  - test/fixtures/stylesheets/archetype/source/styleguide/fallback_styles.scss
355
+ - test/fixtures/stylesheets/archetype/source/styleguide/invalid_structures.scss
356
+ - test/fixtures/stylesheets/archetype/source/styleguide/multi_value.scss
329
357
  - test/fixtures/stylesheets/archetype/source/styleguide/nested_styleguides.scss
330
358
  - test/fixtures/stylesheets/archetype/source/styleguide/selective_state.scss
331
359
  - test/fixtures/stylesheets/archetype/source/ui/glyph_icon.scss