middleman-kss 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b7bce4a832b29d26b1ad37f71974534425c2d54
4
- data.tar.gz: 2faeb01d47817a1ae87cbd73a5e960c808a79425
3
+ metadata.gz: 7e295d8a24e297f9a17cf975dd6abc3acebed52c
4
+ data.tar.gz: a322374f975f72e9e73b89a25ee4d12a85e4ab1c
5
5
  SHA512:
6
- metadata.gz: a61853655503fba484196d966c36dc084ba809d800db1e6193f5379b89358f2d528a5ec2968bc6fc57fa673037f2320b904ad01084cf9abc59099030dde37a81
7
- data.tar.gz: 88a88f44e572fe62732bdb03923ca61dc8d5a0011021bdf25a7f00e5f5342b14735ffff5a1934e5786b2871eead2f9cf30862186fa0dc5f95cf64b3a62477377
6
+ metadata.gz: b06ae35c7069e7df183f9d6b464f16ad7a3a37f8550f9e6388ff3eabd765b32d4fcf2b56d266db3a03868ec73475c92945be09452226d147f1f62e32b3631f45
7
+ data.tar.gz: aafdf8db6389d7e015d02cf230542030db2e73bb7a4f0e62c504b84b6569a9b5bbcbc6293249fe518e32e772f5aae26dc5563cc5302135712470c96bf0a466e1
data/README.md CHANGED
@@ -11,7 +11,7 @@ and other documentation.
11
11
 
12
12
  ## Requirements
13
13
 
14
- `middleman-kss` currently only works with Middleman 3.0.14 or earlier.
14
+ `middleman-kss` has currently only been tested with Middleman 3.2.0.
15
15
 
16
16
  ## Installation
17
17
 
@@ -40,14 +40,17 @@ And read the next chapter for usage instructions.
40
40
 
41
41
  Okay, here's the deal:
42
42
 
43
- 1. Write your CSS/SCSS/LESS in [KSS][kss]
44
- 2. Insert your CSS/SCSS/LESS into the `kss_dir`
43
+ 1. Write your CSS\* in [KSS][kss]
44
+ 2. Insert your CSS into the directory you specified as your `kss_dir` in `config.rb`
45
45
  3. Create individual style blocks into `source/styleblocks`
46
46
  - Name them like this: `_buttons.html.erb`, you know
47
- 4. Use the helpers to print the style blocks
47
+ 4. Include the CSS files in the styleguide HTML
48
+ 5. Use the helper (documentation below) to print the style blocks
48
49
 
49
50
  See my [middleman-styleguide-template][template] for examples!
50
51
 
52
+ \* You can use Sass, SCSS or LESS, too :)
53
+
51
54
  ### Helpers
52
55
 
53
56
  **styleblock** <%= styleblock 'filename', [section: '1.1'] %>
@@ -1,16 +1,21 @@
1
1
  Feature: Syntax highlighting with the "code" helper method
2
2
 
3
+ Scenario: Renders plain styleblock
4
+ Given the Server is running at "test-app"
5
+ When I go to "/elements.html"
6
+ Then I should see '<button class="btn">Button</button>'
7
+
3
8
  Scenario: Renders the styleguide
4
9
  Given the Server is running at "test-app"
5
10
  When I go to "/styleguide.html"
6
11
  Then I should see '<h1>Styleguide</h1>'
7
12
 
8
- Scenario: Renders plain styleblock
13
+ Scenario: Renders pseudo classes when section is found
9
14
  Given the Server is running at "test-app"
10
15
  When I go to "/styleguide.html"
11
- Then I should see '<button class="btn">Button</button>'
16
+ Then I should see '<button class="btn pseudo-class-hover">Button</button>'
12
17
 
13
- Scenario: Renders pseudo classes when section is found
18
+ Scenario: Support for Middleman's 'partial' helper
14
19
  Given the Server is running at "test-app"
15
20
  When I go to "/styleguide.html"
16
- Then I should see '<button class="btn pseudo-class-hover">Button</button>'
21
+ Then I should see '<a href="#" class="btn pseudo-class-hover">Link button</a>'
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: Elements
3
+ ---
4
+
5
+ # Elements
6
+
7
+ ## Buttons
8
+
9
+ <%= styleblock 'buttons' %>
@@ -0,0 +1 @@
1
+ <a href="#" class="<%= css_class %>"><%= text %></a>
@@ -1,3 +1,3 @@
1
+ <%= partial 'partials/link', locals: { css_class: 'btn$modifier_class', text: 'Link button' } %>
1
2
  <button class="btn$modifier_class">Button</button>
2
- <a class="btn$modifier_class">Link button</a>
3
3
  <input type="submit" class="btn$modifier_class" value="Submit button" />
@@ -4,10 +4,6 @@ title: Styleguide
4
4
 
5
5
  # Styleguide
6
6
 
7
- ## Plain styleblock
7
+ ## Buttons
8
8
 
9
- <%= styleblock 'buttons' %>
10
-
11
- ## Pretty styleblock
12
-
13
- <%= styleblock 'buttons', section: '1.1' %>
9
+ <%= styleblock 'buttons', section: '1.1', locals: { foo: 1, bar: 'two' } %>
@@ -46,7 +46,7 @@ module Middleman
46
46
  tile_path = File.join(self.source_dir, "styleblocks", tile_file)
47
47
  tile_template = ::Tilt.new(tile_path)
48
48
 
49
- @block_html = tile_template.render
49
+ @block_html = tile_template.render(self)
50
50
  @styleguide = self.get_styleguide
51
51
 
52
52
  if options.has_key?(:section)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module KSS
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-kss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antti-Jussi Kovalainen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-08 00:00:00.000000000 Z
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,11 +93,12 @@ files:
93
93
  - LICENSE
94
94
  - README.md
95
95
  - Rakefile
96
- - TODO.md
97
96
  - features/helper.feature
98
97
  - features/support/env.rb
99
98
  - fixtures/test-app/config.rb
100
99
  - fixtures/test-app/source/css/test.css
100
+ - fixtures/test-app/source/elements.html.md.erb
101
+ - fixtures/test-app/source/partials/_link.html.erb
101
102
  - fixtures/test-app/source/styleblocks/_buttons.html.erb
102
103
  - fixtures/test-app/source/styleguide.html.md.erb
103
104
  - lib/middleman-kss.rb
data/TODO.md DELETED
@@ -1,9 +0,0 @@
1
- - Add kss_dir to sprockets' asset path, so Middleman includes it if it's not under stylesheets and Sass/Compass helpers work correctly
2
- - Refactor hacky redcarpet implementation, allow use of other engines
3
- - Add tests
4
-
5
- -------------------------------------------------------------------------------
6
-
7
- ✓ COMPLETED:
8
-
9
- ✗ NOPE: