dress_code 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/bin/dress_code +2 -1
- data/lib/dress_code/generator.rb +3 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -79,7 +79,7 @@ Comments like the following will be extracted from your stylesheets:
|
|
79
79
|
```
|
80
80
|
*/
|
81
81
|
|
82
|
-
The content of your comment block is parsed as
|
82
|
+
The content of your comment block is parsed as markdown with github-style code fences. HTML code fences will be syntax highlighted and rendered (YES RENDERED!) in your styleguide.
|
83
83
|
|
84
84
|
Feel free to extend `DressCode::Extractor` to match your own style of comments.
|
85
85
|
|
data/bin/dress_code
CHANGED
@@ -89,7 +89,8 @@ generator = DressCode::Generator.new({
|
|
89
89
|
:css => config['css'],
|
90
90
|
:js => config['js'],
|
91
91
|
:dress_code_css => config['dress_code_css'],
|
92
|
-
:dress_code_js => config['dress_code_js']
|
92
|
+
:dress_code_js => config['dress_code_js'],
|
93
|
+
:template => config['template']
|
93
94
|
})
|
94
95
|
generator.generate()
|
95
96
|
|
data/lib/dress_code/generator.rb
CHANGED
@@ -5,7 +5,7 @@ require 'debugger'
|
|
5
5
|
class DressCode::Generator
|
6
6
|
|
7
7
|
STATIC = "#{File.dirname(__FILE__)}/../static"
|
8
|
-
TEMPLATE =
|
8
|
+
TEMPLATE = "#{STATIC}/styleguide.html.mustache"
|
9
9
|
|
10
10
|
def initialize(opts)
|
11
11
|
@out_file = opts[:out_file] || 'styleguide.html'
|
@@ -18,7 +18,8 @@ class DressCode::Generator
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def generate
|
21
|
-
|
21
|
+
template = File.read(@template)
|
22
|
+
write_file(@out_file, Mustache.render(template, {
|
22
23
|
:docs => map_docs,
|
23
24
|
:css => @css,
|
24
25
|
:js => @js,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dress_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: redcarpet
|