middleman-kss 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/features/helper.feature +9 -4
- data/fixtures/test-app/source/elements.html.md.erb +9 -0
- data/fixtures/test-app/source/partials/_link.html.erb +1 -0
- data/fixtures/test-app/source/styleblocks/_buttons.html.erb +1 -1
- data/fixtures/test-app/source/styleguide.html.md.erb +2 -6
- data/lib/middleman-kss/extension.rb +1 -1
- data/lib/middleman-kss/version.rb +1 -1
- metadata +4 -3
- data/TODO.md +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e295d8a24e297f9a17cf975dd6abc3acebed52c
|
4
|
+
data.tar.gz: a322374f975f72e9e73b89a25ee4d12a85e4ab1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
44
|
-
2. Insert your CSS
|
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.
|
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'] %>
|
data/features/helper.feature
CHANGED
@@ -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
|
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:
|
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 '<
|
21
|
+
Then I should see '<a href="#" class="btn pseudo-class-hover">Link button</a>'
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="#" class="<%= css_class %>"><%= text %></a>
|
@@ -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)
|
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.
|
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-
|
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:
|