doggystyle 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.hound.yml +5 -0
- data/.npmignore +18 -0
- data/.ruby-version +1 -0
- data/.scss-lint.yml +243 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +40 -0
- data/RELEASING.md +1 -0
- data/Rakefile +9 -0
- data/bin/doggystyle +5 -0
- data/bower.json +38 -0
- data/circle.yml +13 -0
- data/core/_imports.scss +229 -0
- data/core/animations/_jump.scss +7 -0
- data/core/animations/_shake.scss +24 -0
- data/core/animations/_wobble.scss +8 -0
- data/core/functions/_mobile-first.scss +3 -0
- data/core/functions/_opposite-direction.scss +45 -0
- data/core/functions/casts/_to-bool.scss +19 -0
- data/core/functions/casts/_to-color.scss +74 -0
- data/core/functions/casts/_to-list.scss +38 -0
- data/core/functions/casts/_to-map.scss +27 -0
- data/core/functions/casts/_to-null.scss +15 -0
- data/core/functions/casts/_to-number.scss +66 -0
- data/core/functions/casts/_to-string.scss +15 -0
- data/core/functions/colours/_colour-contrast.scss +61 -0
- data/core/functions/colours/_colour.scss +69 -0
- data/core/functions/colours/_random-colour.scss +78 -0
- data/core/functions/lists/_contains.scss +62 -0
- data/core/functions/lists/_first.scss +19 -0
- data/core/functions/lists/_insert-nth.scss +37 -0
- data/core/functions/lists/_last.scss +11 -0
- data/core/functions/lists/_merge.scss +30 -0
- data/core/functions/lists/_prepend.scss +11 -0
- data/core/functions/lists/_remove-nth.scss +53 -0
- data/core/functions/lists/_remove.scss +30 -0
- data/core/functions/lists/_replace-nth.scss +55 -0
- data/core/functions/lists/_replace.scss +36 -0
- data/core/functions/lists/_reverse.scss +31 -0
- data/core/functions/lists/_second.scss +19 -0
- data/core/functions/lists/_shift.scss +24 -0
- data/core/functions/lists/_slice.scss +52 -0
- data/core/functions/lists/_sort.scss +51 -0
- data/core/functions/maps/_map-deep-get.scss +51 -0
- data/core/functions/maps/_map-deep-set.scss +34 -0
- data/core/functions/maps/_map-depth.scss +23 -0
- data/core/functions/maps/_map-extend.scss +47 -0
- data/core/functions/maps/_map-has-keys.scss +23 -0
- data/core/functions/maps/_map-has-nested-keys.scss +24 -0
- data/core/functions/maps/_map-set.scss +4 -0
- data/core/functions/maps/_map-zip.scss +50 -0
- data/core/functions/numbers/_add-unit.scss +54 -0
- data/core/functions/numbers/_pad.scss +16 -0
- data/core/functions/numbers/_spacer.scss +16 -0
- data/core/functions/numbers/_strip.scss +29 -0
- data/core/functions/numbers/_units.scss +17 -0
- data/core/functions/svg/_dots.scss +84 -0
- data/core/functions/svg/_fake-radius.scss +131 -0
- data/core/functions/svg/_lines.scss +76 -0
- data/core/functions/svg/_svg.scss +12 -0
- data/core/functions/text/_smart-lineheight.scss +13 -0
- data/core/functions/text/_string-explode.scss +45 -0
- data/core/functions/text/_string-replace.scss +38 -0
- data/core/helpers/_custom-elements.scss +114 -0
- data/core/helpers/_eases.scss +44 -0
- data/core/helpers/_reset.scss +282 -0
- data/core/helpers/_show-breakpoints.scss +25 -0
- data/core/helpers/_strings.scss +648 -0
- data/core/helpers/_warnings.scss +3 -0
- data/core/helpers/checks/_check.scss +69 -0
- data/core/helpers/checks/_is-absolute-length.scss +25 -0
- data/core/helpers/checks/_is-angel.scss +25 -0
- data/core/helpers/checks/_is-arglist.scss +11 -0
- data/core/helpers/checks/_is-bool.scss +23 -0
- data/core/helpers/checks/_is-calc.scss +11 -0
- data/core/helpers/checks/_is-colour.scss +23 -0
- data/core/helpers/checks/_is-dark.scss +14 -0
- data/core/helpers/checks/_is-duration.scss +15 -0
- data/core/helpers/checks/_is-false.scss +13 -0
- data/core/helpers/checks/_is-first-character.scss +11 -0
- data/core/helpers/checks/_is-frequency.scss +15 -0
- data/core/helpers/checks/_is-function.scss +44 -0
- data/core/helpers/checks/_is-integer.scss +15 -0
- data/core/helpers/checks/_is-length.scss +16 -0
- data/core/helpers/checks/_is-light.scss +14 -0
- data/core/helpers/checks/_is-list.scss +11 -0
- data/core/helpers/checks/_is-map.scss +11 -0
- data/core/helpers/checks/_is-null.scss +11 -0
- data/core/helpers/checks/_is-number.scss +19 -0
- data/core/helpers/checks/_is-percentage.scss +13 -0
- data/core/helpers/checks/_is-position.scss +16 -0
- data/core/helpers/checks/_is-pseudo.scss +24 -0
- data/core/helpers/checks/_is-relative-length.scss +25 -0
- data/core/helpers/checks/_is-resolution.scss +15 -0
- data/core/helpers/checks/_is-selector.scss +3 -0
- data/core/helpers/checks/_is-string.scss +11 -0
- data/core/helpers/checks/_is-time.scss +15 -0
- data/core/helpers/checks/_is-unit.scss +16 -0
- data/core/helpers/private/_arglist-to-list.scss +36 -0
- data/core/helpers/private/_brightness.scss +13 -0
- data/core/helpers/private/_find-digits.scss +41 -0
- data/core/helpers/private/_find-integer.scss +40 -0
- data/core/helpers/private/_from-hex.scss +48 -0
- data/core/helpers/private/_from-hsl.scss +55 -0
- data/core/helpers/private/_from-rgb.scss +55 -0
- data/core/helpers/private/_get-color-value.scss +26 -0
- data/core/helpers/private/_hash-fix.scss +15 -0
- data/core/helpers/private/_hex-to-dec.scss +28 -0
- data/core/helpers/private/_length.scss +26 -0
- data/core/helpers/private/_lightness.scss +15 -0
- data/core/helpers/private/_list-items-to-strings.scss +8 -0
- data/core/helpers/private/_min-max-number.scss +12 -0
- data/core/helpers/private/_pow.scss +29 -0
- data/core/helpers/private/_string-compare.scss +38 -0
- data/core/helpers/private/_string-explode.scss +43 -0
- data/core/helpers/private/_sudo.scss +23 -0
- data/core/helpers/symbols/_arrows.scss +337 -0
- data/core/helpers/symbols/_block.scss +97 -0
- data/core/helpers/symbols/_box.scss +385 -0
- data/core/helpers/symbols/_common.scss +101 -0
- data/core/helpers/symbols/_currency.scss +82 -0
- data/core/helpers/symbols/_dingbats.scss +565 -0
- data/core/helpers/symbols/_geometric.scss +289 -0
- data/core/helpers/symbols/_letterlike.scss +235 -0
- data/core/helpers/symbols/_misc.scss +568 -0
- data/core/helpers/symbols/_operators.scss +766 -0
- data/core/helpers/symbols/_punctuation.scss +214 -0
- data/core/mixins/_align.scss +15 -0
- data/core/mixins/_animate.scss +16 -0
- data/core/mixins/_aspect-ratio.scss +86 -0
- data/core/mixins/_backface-visibility.scss +7 -0
- data/core/mixins/_background-image.scss +13 -0
- data/core/mixins/_blend.scss +10 -0
- data/core/mixins/_blendmodes.scss +24 -0
- data/core/mixins/_border-radius.scss +105 -0
- data/core/mixins/_browsers.scss +155 -0
- data/core/mixins/_bulletpoint.scss +12 -0
- data/core/mixins/_center.scss +3 -0
- data/core/mixins/_clearfix.scss +7 -0
- data/core/mixins/_columns.scss +22 -0
- data/core/mixins/_custom-property.scss +15 -0
- data/core/mixins/_devices.scss +97 -0
- data/core/mixins/_dropdown.scss +38 -0
- data/core/mixins/_fake-radius.scss +99 -0
- data/core/mixins/_filters.scss +163 -0
- data/core/mixins/_flip.scss +11 -0
- data/core/mixins/_font-face.scss +11 -0
- data/core/mixins/_fontsize.scss +126 -0
- data/core/mixins/_gallery.scss +134 -0
- data/core/mixins/_gradient.scss +72 -0
- data/core/mixins/_image-size.scss +18 -0
- data/core/mixins/_image.scss +12 -0
- data/core/mixins/_inputs.scss +18 -0
- data/core/mixins/_keyframes.scss +8 -0
- data/core/mixins/_last.scss +5 -0
- data/core/mixins/_nth-last.scss +7 -0
- data/core/mixins/_nth.scss +10 -0
- data/core/mixins/_placeholder.scss +15 -0
- data/core/mixins/_prefixer.scss +55 -0
- data/core/mixins/_selection.scss +15 -0
- data/core/mixins/_shadow.scss +7 -0
- data/core/mixins/_size.scss +13 -0
- data/core/mixins/_smart-horizontal.scss +21 -0
- data/core/mixins/_sudo-image.scss +12 -0
- data/core/mixins/_text-shadow.scss +30 -0
- data/core/mixins/_transforms.scss +264 -0
- data/core/mixins/_transition.scss +189 -0
- data/core/mixins/_triangle-classic.scss +170 -0
- data/core/mixins/_triangle.scss +250 -0
- data/core/mixins/_unwrap.scss +5 -0
- data/core/mixins/_user-select.scss +5 -0
- data/core/mixins/_vertical.scss +10 -0
- data/core/mixins/columns/_columns.scss +92 -0
- data/core/mixins/flexbox/_flex-container.scss +201 -0
- data/core/mixins/flexbox/_flex-grid.scss +235 -0
- data/core/mixins/flexbox/_flex-items.scss +140 -0
- data/core/mixins/flexbox/_flex-remove.scss +12 -0
- data/core/mixins/grid/_break-between.scss +6 -0
- data/core/mixins/grid/_grid.scss +150 -0
- data/core/mixins/svg/_svg-size.scss +4 -0
- data/core/mixins/svg/_svg.scss +9 -0
- data/core/placeholders/_clear.scss +27 -0
- data/core/placeholders/_cursor.scss +35 -0
- data/core/placeholders/_misc.scss +20 -0
- data/core/placeholders/_rendering.scss +21 -0
- data/core/placeholders/_text.scss +41 -0
- data/core/settings/_colours.scss +30 -0
- data/core/settings/_directories.scss +7 -0
- data/core/settings/_global.scss +14 -0
- data/core/settings/_grid.scss +24 -0
- data/core/settings/_padding.scss +8 -0
- data/core/settings/_spacing.scss +8 -0
- data/core/settings/_text.scss +13 -0
- data/doggystyle.gemspec +29 -0
- data/eyeglass-exports.js +7 -0
- data/features/install.feature +29 -0
- data/features/step_definitions/doggystyle_steps.rb +31 -0
- data/features/support/bourbon_support.rb +19 -0
- data/features/support/env.rb +1 -0
- data/features/update.feature +30 -0
- data/features/version.feature +5 -0
- data/index.js +7 -0
- data/lib/doggystyle.rb +7 -0
- data/lib/doggystyle/generator.rb +81 -0
- data/lib/doggystyle/version.rb +3 -0
- data/package.json +33 -0
- data/spec/doggystyle/library/border_color_spec.rb +51 -0
- data/spec/doggystyle/library/border_radius_spec.rb +25 -0
- data/spec/doggystyle/library/border_style_spec.rb +51 -0
- data/spec/doggystyle/library/border_width_spec.rb +51 -0
- data/spec/doggystyle/library/buttons_spec.rb +53 -0
- data/spec/doggystyle/library/clearfix_spec.rb +18 -0
- data/spec/doggystyle/library/contrast_switch_spec.rb +23 -0
- data/spec/doggystyle/library/ellipsis_spec.rb +20 -0
- data/spec/doggystyle/library/font_face_spec_1.rb +16 -0
- data/spec/doggystyle/library/font_face_spec_2.rb +21 -0
- data/spec/doggystyle/library/font_face_spec_3.rb +16 -0
- data/spec/doggystyle/library/font_face_spec_4.rb +17 -0
- data/spec/doggystyle/library/font_stacks_spec.rb +40 -0
- data/spec/doggystyle/library/hide_text_spec.rb +17 -0
- data/spec/doggystyle/library/hide_visually_spec.rb +35 -0
- data/spec/doggystyle/library/margin_spec.rb +51 -0
- data/spec/doggystyle/library/modular_scale_spec.rb +43 -0
- data/spec/doggystyle/library/padding_spec.rb +51 -0
- data/spec/doggystyle/library/position_spec.rb +67 -0
- data/spec/doggystyle/library/prefixer_spec.rb +34 -0
- data/spec/doggystyle/library/shade_spec.rb +31 -0
- data/spec/doggystyle/library/size_spec.rb +31 -0
- data/spec/doggystyle/library/strip_unit_spec.rb +31 -0
- data/spec/doggystyle/library/text_inputs_spec.rb +75 -0
- data/spec/doggystyle/library/tint_spec.rb +31 -0
- data/spec/doggystyle/library/triangle_spec.rb +31 -0
- data/spec/doggystyle/library/word_wrap_spec.rb +29 -0
- data/spec/doggystyle/utilities/assign_inputs_spec.rb +50 -0
- data/spec/doggystyle/utilities/collapse_directionals.rb +25 -0
- data/spec/doggystyle/utilities/directional_values_spec.rb +21 -0
- data/spec/doggystyle/utilities/font_source_declaration_spec.rb +29 -0
- data/spec/doggystyle/utilities/retrieve_bourbon_setting_spec.rb +31 -0
- data/spec/doggystyle/utilities/unpack_spec.rb +32 -0
- data/spec/doggystyle/validators/contains_spec.rb +27 -0
- data/spec/doggystyle/validators/is_length_spec.rb +49 -0
- data/spec/doggystyle/validators/is_light_spec.rb +37 -0
- data/spec/doggystyle/validators/is_number_spec.rb +43 -0
- data/spec/doggystyle/validators/is_size_spec.rb +43 -0
- data/spec/fixtures/_setup.scss +1 -0
- data/spec/fixtures/library/border-color.scss +26 -0
- data/spec/fixtures/library/border-radius.scss +17 -0
- data/spec/fixtures/library/border-style.scss +21 -0
- data/spec/fixtures/library/border-width.scss +21 -0
- data/spec/fixtures/library/buttons.scss +17 -0
- data/spec/fixtures/library/clearfix.scss +5 -0
- data/spec/fixtures/library/contrast-switch.scss +9 -0
- data/spec/fixtures/library/ellipsis.scss +5 -0
- data/spec/fixtures/library/font-face-1.scss +6 -0
- data/spec/fixtures/library/font-face-2.scss +10 -0
- data/spec/fixtures/library/font-face-3.scss +8 -0
- data/spec/fixtures/library/font-face-4.scss +7 -0
- data/spec/fixtures/library/font-stacks.scss +41 -0
- data/spec/fixtures/library/hide-text.scss +5 -0
- data/spec/fixtures/library/hide-visually.scss +9 -0
- data/spec/fixtures/library/margin.scss +21 -0
- data/spec/fixtures/library/modular-scale.scss +29 -0
- data/spec/fixtures/library/padding.scss +21 -0
- data/spec/fixtures/library/position.scss +25 -0
- data/spec/fixtures/library/prefixer.scss +13 -0
- data/spec/fixtures/library/shade.scss +17 -0
- data/spec/fixtures/library/size.scss +13 -0
- data/spec/fixtures/library/strip-unit.scss +17 -0
- data/spec/fixtures/library/text-inputs.scss +21 -0
- data/spec/fixtures/library/tint.scss +17 -0
- data/spec/fixtures/library/triangle.scss +9 -0
- data/spec/fixtures/library/word-wrap.scss +9 -0
- data/spec/fixtures/utilities/assign-inputs.scss +19 -0
- data/spec/fixtures/utilities/collapse-directionals.scss +17 -0
- data/spec/fixtures/utilities/directional-values.scss +13 -0
- data/spec/fixtures/utilities/font-source-declaration.scss +11 -0
- data/spec/fixtures/utilities/retrieve-bourbon-setting.scss +16 -0
- data/spec/fixtures/utilities/unpack.scss +17 -0
- data/spec/fixtures/validators/contains.scss +28 -0
- data/spec/fixtures/validators/is-length.scss +35 -0
- data/spec/fixtures/validators/is-light.scss +29 -0
- data/spec/fixtures/validators/is-number.scss +31 -0
- data/spec/fixtures/validators/is-size.scss +31 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/matchers/have_rule.rb +35 -0
- data/spec/support/matchers/have_ruleset.rb +20 -0
- data/spec/support/matchers/have_value.rb +17 -0
- data/spec/support/parser_support.rb +16 -0
- data/spec/support/sass_support.rb +10 -0
- 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,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,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
|
data/doggystyle.gemspec
ADDED
@@ -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
|
data/eyeglass-exports.js
ADDED
@@ -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."
|
data/index.js
ADDED
data/lib/doggystyle.rb
ADDED
@@ -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
|
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
|