haml-edge 2.1.21 → 2.1.22
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.
- data/EDGE_GEM_VERSION +1 -1
- data/FAQ.md +142 -0
- data/{README.rdoc → README.md} +141 -141
- data/Rakefile +29 -17
- data/VERSION +1 -1
- data/lib/haml/buffer.rb +63 -27
- data/lib/haml/engine.rb +103 -80
- data/lib/haml/error.rb +7 -7
- data/lib/haml/exec.rb +80 -26
- data/lib/haml/filters.rb +106 -40
- data/lib/haml/helpers/action_view_extensions.rb +34 -39
- data/lib/haml/helpers/action_view_mods.rb +132 -139
- data/lib/haml/helpers.rb +207 -153
- data/lib/haml/html.rb +40 -21
- data/lib/haml/precompiler.rb +2 -0
- data/lib/haml/shared.rb +34 -3
- data/lib/haml/template/patch.rb +1 -1
- data/lib/haml/template/plugin.rb +0 -2
- data/lib/haml/template.rb +5 -0
- data/lib/haml/util.rb +136 -1
- data/lib/haml/version.rb +16 -4
- data/lib/haml.rb +502 -481
- data/lib/sass/css.rb +106 -68
- data/lib/sass/engine.rb +55 -22
- data/lib/sass/environment.rb +52 -21
- data/lib/sass/error.rb +23 -12
- data/lib/sass/files.rb +27 -0
- data/lib/sass/plugin/merb.rb +2 -2
- data/lib/sass/plugin/rails.rb +0 -2
- data/lib/sass/plugin.rb +32 -23
- data/lib/sass/repl.rb +7 -0
- data/lib/sass/script/bool.rb +9 -5
- data/lib/sass/script/color.rb +87 -1
- data/lib/sass/script/funcall.rb +23 -2
- data/lib/sass/script/functions.rb +93 -44
- data/lib/sass/script/lexer.rb +33 -3
- data/lib/sass/script/literal.rb +93 -1
- data/lib/sass/script/node.rb +14 -0
- data/lib/sass/script/number.rb +128 -4
- data/lib/sass/script/operation.rb +16 -1
- data/lib/sass/script/parser.rb +51 -21
- data/lib/sass/script/string.rb +7 -4
- data/lib/sass/script/unary_operation.rb +14 -1
- data/lib/sass/script/variable.rb +12 -1
- data/lib/sass/script.rb +26 -5
- data/lib/sass/tree/attr_node.rb +46 -9
- data/lib/sass/tree/comment_node.rb +41 -1
- data/lib/sass/tree/debug_node.rb +8 -0
- data/lib/sass/tree/directive_node.rb +20 -0
- data/lib/sass/tree/file_node.rb +12 -0
- data/lib/sass/tree/for_node.rb +15 -0
- data/lib/sass/tree/if_node.rb +22 -0
- data/lib/sass/tree/mixin_def_node.rb +12 -1
- data/lib/sass/tree/mixin_node.rb +13 -0
- data/lib/sass/tree/node.rb +136 -6
- data/lib/sass/tree/rule_node.rb +66 -7
- data/lib/sass/tree/variable_node.rb +10 -0
- data/lib/sass/tree/while_node.rb +11 -1
- data/lib/sass.rb +544 -534
- metadata +7 -6
- data/FAQ +0 -138
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.22
|
data/FAQ.md
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
# Frequently Asked Questions
|
2
|
+
|
3
|
+
## Haml
|
4
|
+
|
5
|
+
### How do I put a punctuation mark after an element, like "`I like <strong>cake</strong>!`"?
|
6
|
+
{#q-punctuation}
|
7
|
+
|
8
|
+
Expressing the structure of a document
|
9
|
+
and expressing inline formatting are two very different problems.
|
10
|
+
Haml is mostly designed for structure,
|
11
|
+
so the best way to deal with formatting is to leave it to other languages
|
12
|
+
that are designed for it.
|
13
|
+
You could use Textile:
|
14
|
+
|
15
|
+
%p
|
16
|
+
:textile
|
17
|
+
I like *cake*!
|
18
|
+
|
19
|
+
or Markdown:
|
20
|
+
|
21
|
+
%p
|
22
|
+
:markdown
|
23
|
+
I like **cake**!
|
24
|
+
|
25
|
+
or plain old XHTML:
|
26
|
+
|
27
|
+
%p I like <strong>cake</strong>!
|
28
|
+
|
29
|
+
If you're inserting something that's generated by a helper, like a link,
|
30
|
+
then it's even easier:
|
31
|
+
|
32
|
+
%p== I like #{link_to 'chocolate', 'http://franschocolates.com'}!
|
33
|
+
|
34
|
+
### How do I stop Haml from indenting the contents of my `pre` and `textarea` tags?
|
35
|
+
{#q-preserve}
|
36
|
+
|
37
|
+
Because Haml automatically indents the HTML source code,
|
38
|
+
the contents of whitespace-sensitive tags like `pre` and `textarea`
|
39
|
+
can get screwed up.
|
40
|
+
The solution is to replace the newlines inside these tags
|
41
|
+
with HTML newline entities (`
`),
|
42
|
+
which Haml does using the {Haml::Helpers#preserve} and {Haml::Helpers#find_and_preserve} helpers.
|
43
|
+
|
44
|
+
Normally, Haml will do this for you automatically
|
45
|
+
when you're using a tag that needs it
|
46
|
+
(this can be customized using the [`:preserve`](Haml.html#preserve-option) option.
|
47
|
+
For example,
|
48
|
+
|
49
|
+
%p
|
50
|
+
%textarea= "Foo\nBar"
|
51
|
+
|
52
|
+
will be compiled to
|
53
|
+
|
54
|
+
<p>
|
55
|
+
<textarea>Foo
Bar</textarea>
|
56
|
+
</p>
|
57
|
+
|
58
|
+
However, if a helper is generating the tag,
|
59
|
+
Haml can't detect that and so you'll have to call {Haml::Helpers#find_and_preserve} yourself.
|
60
|
+
You can also use `~`, which is the same as `=`
|
61
|
+
except that it automatically runs `find_and_preserve` on its input.
|
62
|
+
For example:
|
63
|
+
|
64
|
+
%p= find_and_preserve "<textarea>Foo\nBar</textarea>"
|
65
|
+
|
66
|
+
is the same as
|
67
|
+
|
68
|
+
%p~ "<textarea>Foo\nBar</textarea>"
|
69
|
+
|
70
|
+
and renders
|
71
|
+
|
72
|
+
<p><textarea>Foo
Bar</textarea></p>
|
73
|
+
|
74
|
+
### How do I make my long lines of Ruby code look nicer in my Haml document?
|
75
|
+
{#q-multiline}
|
76
|
+
|
77
|
+
Put them in a helper or your model.
|
78
|
+
|
79
|
+
Haml purposefully makes it annoying to put lots of Ruby code into your templates,
|
80
|
+
because lots of code doesn't belong in the view.
|
81
|
+
If you take that huge `link_to_remote` call
|
82
|
+
and move it to a `update_sidebar_link` helper,
|
83
|
+
it'll make your view both easier to read and more semantic.
|
84
|
+
|
85
|
+
If you absolutely must put lots of code in your template,
|
86
|
+
Haml offers a somewhat awkward multiline-continuation tool.
|
87
|
+
Put a `|` (pipe character) at the end of each line you want to be merged into one
|
88
|
+
(including the last line!).
|
89
|
+
For example:
|
90
|
+
|
91
|
+
%p= @this.is(way.too.much). |
|
92
|
+
code("and I should"). |
|
93
|
+
really_move.it.into( |
|
94
|
+
:a => @helper) |
|
95
|
+
|
96
|
+
### I have Haml installed. Why is Rails (only looking for `.html.erb` files | rendering Haml files as plain text | rendering Haml files as blank pages)?
|
97
|
+
{#q-blank-page}
|
98
|
+
|
99
|
+
There are several reasons these things might be happening.
|
100
|
+
First of all, make sure `vendor/plugins/haml` really exists
|
101
|
+
and has an `init.rb` file in there.
|
102
|
+
Then try restarting Mongrel or WEBrick or whatever you might be using.
|
103
|
+
|
104
|
+
Finally, if none of these work,
|
105
|
+
chances are you've got some localization plugin like Globalize installed.
|
106
|
+
Such plugins often don't play nicely with Haml.
|
107
|
+
Luckily, there's usually an easy fix.
|
108
|
+
For Globalize, just edit `globalize/lib/globalize/rails/action_view.rb`
|
109
|
+
and change
|
110
|
+
|
111
|
+
@@re_extension = /\.(rjs|rhtml|rxml)$/
|
112
|
+
|
113
|
+
to
|
114
|
+
|
115
|
+
@@re_extension = /\.(rjs|rhtml|rxml|erb|builder|haml)$/
|
116
|
+
|
117
|
+
For other plugins, a little searching will probably turn up a way to fix them as well.
|
118
|
+
|
119
|
+
## Sass
|
120
|
+
|
121
|
+
### Can I use a variable from my controller in my Sass file?
|
122
|
+
{#q-ruby-code}
|
123
|
+
|
124
|
+
No. Sass files aren't views.
|
125
|
+
They're compiled once into static CSS files,
|
126
|
+
then left along until they're changed and need to be compiled again.
|
127
|
+
Not only don't you want to be running a full request cycle
|
128
|
+
every time someone requests a stylesheet,
|
129
|
+
but it's not a great idea to put much logic in there anyway
|
130
|
+
due to how browsers handle them.
|
131
|
+
|
132
|
+
If you really need some sort of dynamic CSS,
|
133
|
+
the best thing to do is put only the snippet you need to dynamically set
|
134
|
+
in the `head` of your HTML document.
|
135
|
+
|
136
|
+
## You still haven't answered my question!
|
137
|
+
|
138
|
+
Sorry! Try looking at the Haml or Sass references,
|
139
|
+
in the doucmentation for the haml and Sass modules, respectively.
|
140
|
+
If you can't find an answer there,
|
141
|
+
feel free to ask in `#haml` on irc.freenode.net
|
142
|
+
or send an email to the [mailing list](http://groups.google.com/group/haml?hl=en).
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# Haml and Sass
|
2
2
|
|
3
3
|
Haml and Sass are templating engines
|
4
4
|
for the two most common types of documents on the web:
|
@@ -9,32 +9,32 @@ by eliminating redundancy,
|
|
9
9
|
reflecting the underlying structure that the document represents,
|
10
10
|
and providing elegant, easily understandable, and powerful syntax.
|
11
11
|
|
12
|
-
|
12
|
+
## Using
|
13
13
|
|
14
14
|
There are several ways to use Haml and Sass.
|
15
15
|
They can be used as a plugin for Rails or Merb,
|
16
16
|
or embedded on their own in other applications.
|
17
17
|
The first step of all of these is to install the Haml gem:
|
18
18
|
|
19
|
-
|
19
|
+
gem install haml
|
20
20
|
|
21
21
|
To install Haml and Sass as a Rails plugin,
|
22
|
-
just run
|
22
|
+
just run `haml --rails path/to/rails/app`
|
23
23
|
and both Haml and Sass will be installed.
|
24
|
-
Views with the
|
24
|
+
Views with the `.haml` (or `.html.haml` for edge)
|
25
25
|
extension will automatically use Haml.
|
26
26
|
Sass is a little more complicated;
|
27
|
-
|
27
|
+
`.sass` files should be placed in public/stylesheets/sass,
|
28
28
|
where they'll be automatically compiled
|
29
29
|
to corresponding CSS files in public/stylesheets when needed
|
30
30
|
(the Sass template directory is customizable...
|
31
31
|
see the Sass module docs for details).
|
32
32
|
|
33
|
-
For Merb,
|
33
|
+
For Merb, `.html.haml` views will work without any further modification.
|
34
34
|
To enable Sass, you also need to add a dependency.
|
35
35
|
To do so, just add
|
36
36
|
|
37
|
-
|
37
|
+
dependency "merb-haml"
|
38
38
|
|
39
39
|
to config/dependencies.rb (or config/init.rb in a flat/very flat Merb application).
|
40
40
|
Then it'll work just like it does in Rails.
|
@@ -42,31 +42,31 @@ Then it'll work just like it does in Rails.
|
|
42
42
|
To use Haml and Sass programatically,
|
43
43
|
check out the RDocs for the Haml and Sass modules.
|
44
44
|
|
45
|
-
|
45
|
+
## Formatting
|
46
46
|
|
47
|
-
|
47
|
+
### Haml
|
48
48
|
|
49
49
|
The most basic element of Haml
|
50
|
-
is a shorthand for creating HTML
|
50
|
+
is a shorthand for creating HTML
|
51
51
|
|
52
|
-
|
52
|
+
%tagname{:attr1 => 'value1', :attr2 => 'value2'} Contents
|
53
53
|
|
54
54
|
No end-tag is needed; Haml handles that automatically.
|
55
|
-
Adding
|
55
|
+
Adding `class` and `id` attributes is even easier.
|
56
56
|
Haml uses the same syntax as the CSS that styles the document:
|
57
57
|
|
58
|
-
|
58
|
+
%tagname#id.class
|
59
59
|
|
60
|
-
In fact, when you're using the
|
61
|
-
it becomes
|
62
|
-
Because
|
60
|
+
In fact, when you're using the `<div>` tag,
|
61
|
+
it becomes _even easier_.
|
62
|
+
Because `<div>` is such a common element,
|
63
63
|
a tag without a name defaults to a div. So
|
64
64
|
|
65
|
-
|
65
|
+
#foo Hello!
|
66
66
|
|
67
67
|
becomes
|
68
68
|
|
69
|
-
|
69
|
+
<div id='foo'>Hello!</div>
|
70
70
|
|
71
71
|
Haml uses indentation
|
72
72
|
to bring the individual elements to represent the HTML structure.
|
@@ -74,40 +74,40 @@ A tag's children are indented beneath than the parent tag.
|
|
74
74
|
Again, a closing tag is automatically added.
|
75
75
|
For example:
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
%ul
|
78
|
+
%li Salt
|
79
|
+
%li Pepper
|
80
80
|
|
81
81
|
becomes:
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
<ul>
|
84
|
+
<li>Salt</li>
|
85
|
+
<li>Pepper</li>
|
86
|
+
</ul>
|
87
87
|
|
88
88
|
You can also put plain text as a child of an element:
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
%p
|
91
|
+
Hello,
|
92
|
+
World!
|
93
93
|
|
94
94
|
It's also possible to embed Ruby code into Haml documents.
|
95
|
-
An equals sign,
|
96
|
-
A hyphen,
|
95
|
+
An equals sign, `=`, will output the result of the code.
|
96
|
+
A hyphen, `-`, will run the code but not output the result.
|
97
97
|
You can even use control statements
|
98
|
-
like
|
98
|
+
like `if` and `while`:
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
100
|
+
%p
|
101
|
+
Date/Time:
|
102
|
+
- now = DateTime.now
|
103
|
+
%strong= now
|
104
|
+
- if now > DateTime.parse("December 31, 2006")
|
105
|
+
= "Happy new " + "year!"
|
106
106
|
|
107
107
|
Haml provides far more tools than those presented here.
|
108
108
|
Check out the reference documentation in the Haml module.
|
109
109
|
|
110
|
-
|
110
|
+
### Sass
|
111
111
|
|
112
112
|
At its most basic,
|
113
113
|
Sass is just another way of writing CSS.
|
@@ -119,15 +119,15 @@ and newlines indicate the end of an attribute,
|
|
119
119
|
rather than a semicolon.
|
120
120
|
For example:
|
121
121
|
|
122
|
-
|
123
|
-
|
124
|
-
|
122
|
+
#main
|
123
|
+
:background-color #f00
|
124
|
+
:width 98%
|
125
125
|
|
126
126
|
becomes:
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
128
|
+
#main {
|
129
|
+
background-color: #f00;
|
130
|
+
width: 98% }
|
131
131
|
|
132
132
|
However, Sass provides much more than a way to make CSS look nice.
|
133
133
|
In CSS, it's important to have accurate selectors,
|
@@ -144,35 +144,35 @@ Well, Sass gets rid of that.
|
|
144
144
|
Like Haml, it uses indentation to indicate the structure of the document.
|
145
145
|
So, what was:
|
146
146
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
147
|
+
#main {
|
148
|
+
width: 90%;
|
149
|
+
}
|
150
|
+
#main p {
|
151
|
+
border-style: solid;
|
152
|
+
border-width: 1px;
|
153
|
+
border-color: #00f;
|
154
|
+
}
|
155
|
+
#main p a {
|
156
|
+
text-decoration: none;
|
157
|
+
font-weight: bold;
|
158
|
+
}
|
159
|
+
#main p a:hover {
|
160
|
+
text-decoration: underline;
|
161
|
+
}
|
162
162
|
|
163
163
|
becomes:
|
164
164
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
165
|
+
#main
|
166
|
+
:width 90%
|
167
|
+
p
|
168
|
+
:border-style solid
|
169
|
+
:border-width 1px
|
170
|
+
:border-color #00f
|
171
|
+
a
|
172
|
+
:text-decoration none
|
173
|
+
:font-weight bold
|
174
|
+
a:hover
|
175
|
+
:text-decoration underline
|
176
176
|
|
177
177
|
Pretty nice, no? Well, it gets better.
|
178
178
|
One of the main complaints against CSS is that it doesn't allow variables.
|
@@ -180,127 +180,127 @@ What if have a color or a width you re-use all the time?
|
|
180
180
|
In CSS, you just have to re-type it each time,
|
181
181
|
which is a nightmare when you decide to change it later.
|
182
182
|
Not so for Sass!
|
183
|
-
You can use the
|
184
|
-
Then, if you put
|
183
|
+
You can use the `!` character to set variables.
|
184
|
+
Then, if you put `=` after your attribute name,
|
185
185
|
you can set it to a variable.
|
186
186
|
For example:
|
187
187
|
|
188
|
-
|
188
|
+
!note_bg= #55aaff
|
189
189
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
190
|
+
#main
|
191
|
+
:width 70%
|
192
|
+
.note
|
193
|
+
:background-color= !note_bg
|
194
|
+
p
|
195
|
+
:width 5em
|
196
|
+
:background-color= !note_bg
|
197
197
|
|
198
198
|
becomes:
|
199
199
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
200
|
+
#main {
|
201
|
+
width: 70%; }
|
202
|
+
#main .note {
|
203
|
+
background-color: #55aaff; }
|
204
|
+
#main p {
|
205
|
+
width: 5em;
|
206
|
+
background-color: #55aaff; }
|
207
207
|
|
208
208
|
You can even do simple arithmetic operations with variables,
|
209
209
|
adding numbers and even colors together:
|
210
210
|
|
211
|
-
|
212
|
-
|
211
|
+
!main_bg= #46ar12
|
212
|
+
!main_width= 40em
|
213
213
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
214
|
+
#main
|
215
|
+
:background-color= !main_bg
|
216
|
+
:width= !main_width
|
217
|
+
.sidebar
|
218
|
+
:background-color= !main_bg + #333333
|
219
|
+
:width= !main_width - 25em
|
220
220
|
|
221
221
|
becomes:
|
222
222
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
223
|
+
#main {
|
224
|
+
background-color: #46a312;
|
225
|
+
width: 40em; }
|
226
|
+
#main .sidebar {
|
227
|
+
background-color: #79d645;
|
228
|
+
width: 15em; }
|
229
229
|
|
230
230
|
Taking the idea of variables a bit further are mixins.
|
231
231
|
These let you group whole swathes of CSS attributes into a single
|
232
232
|
directive and then include those anywhere you want:
|
233
233
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
234
|
+
=blue-border
|
235
|
+
:border
|
236
|
+
:color blue
|
237
|
+
:width 2px
|
238
|
+
:style dotted
|
239
239
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
240
|
+
.comment
|
241
|
+
+blue-border
|
242
|
+
:padding 2px
|
243
|
+
:margin 10px 0
|
244
244
|
|
245
|
-
|
246
|
-
|
245
|
+
.reply
|
246
|
+
+blue-border
|
247
247
|
|
248
248
|
becomes:
|
249
249
|
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
250
|
+
.comment {
|
251
|
+
border-color: blue;
|
252
|
+
border-width: 2px;
|
253
|
+
border-style: dotted;
|
254
|
+
padding: 2px;
|
255
|
+
margin: 10px 0;
|
256
|
+
}
|
257
257
|
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
258
|
+
.reply {
|
259
|
+
border-color: blue;
|
260
|
+
border-width: 2px;
|
261
|
+
border-style: dotted;
|
262
|
+
}
|
263
263
|
|
264
264
|
A comprehensive list of features is in
|
265
265
|
the documentation for the Sass module.
|
266
266
|
|
267
|
-
|
267
|
+
## Indentation
|
268
268
|
|
269
269
|
Indentation can be made up of one or more tabs or spaces.
|
270
270
|
However, indentation must be consistent within a given document.
|
271
271
|
Hard tabs and spaces can't be mixed,
|
272
272
|
and the same number of tabs or spaces must be used throughout.
|
273
273
|
|
274
|
-
|
274
|
+
## Executables
|
275
275
|
|
276
276
|
The Haml gem includes several executables that are useful
|
277
277
|
for dealing with Haml and Sass from the command line.
|
278
278
|
|
279
|
-
|
279
|
+
### `haml`
|
280
280
|
|
281
|
-
The
|
282
|
-
See
|
281
|
+
The `haml` executable transforms a source Haml file into HTML.
|
282
|
+
See `haml --help` for further information and options.
|
283
283
|
|
284
|
-
|
284
|
+
### `sass`
|
285
285
|
|
286
|
-
The
|
287
|
-
See
|
286
|
+
The `sass` executable transforms a source Sass file into CSS.
|
287
|
+
See `sass --help` for further information and options.
|
288
288
|
|
289
|
-
|
289
|
+
### `html2haml`
|
290
290
|
|
291
|
-
The
|
291
|
+
The `html2haml` executable attempts to transform HTML,
|
292
292
|
optionally with ERB markup, into Haml code.
|
293
293
|
Since HTML is so variable, this transformation is not always perfect;
|
294
294
|
it's a good idea to have a human check the output of this tool.
|
295
|
-
See
|
295
|
+
See `html2haml --help` for further information and options.
|
296
296
|
|
297
|
-
|
297
|
+
### `css2sass`
|
298
298
|
|
299
|
-
The
|
299
|
+
The `css2sass` executable attempts to transform CSS into Sass code.
|
300
300
|
This transformation attempts to use Sass nesting where possible.
|
301
|
-
See
|
301
|
+
See `css2sass --help` for further information and options.
|
302
302
|
|
303
|
-
|
303
|
+
## Authors
|
304
304
|
|
305
305
|
Haml and Sass are designed by Hampton Catlin (hcatlin) and he is the author
|
306
306
|
of the original implementation. However, Hampton doesn't even know his way
|
@@ -329,4 +329,4 @@ buy Nathan some jelly beans. Maybe pet a kitten. Yeah. Pet that kitty.
|
|
329
329
|
Some of the work on Haml was supported by Unspace Interactive.
|
330
330
|
|
331
331
|
Beyond that, the implementation is licensed under the MIT License.
|
332
|
-
|
332
|
+
Okay, fine, I guess that means compliments aren't __required__.
|
data/Rakefile
CHANGED
@@ -122,25 +122,37 @@ end
|
|
122
122
|
|
123
123
|
# ----- Documentation -----
|
124
124
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
125
|
+
task :rdoc do
|
126
|
+
puts '=' * 100, <<END, '=' * 100
|
127
|
+
Haml uses the YARD documentation system (http://github.com/lsegal/yard).
|
128
|
+
Install the yard gem and then run "rake doc".
|
129
|
+
END
|
129
130
|
end
|
130
131
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
132
|
+
begin
|
133
|
+
require 'yard'
|
134
|
+
|
135
|
+
YARD::Rake::YardocTask.new do |t|
|
136
|
+
t.files = FileList.new('lib/**/*.rb') do |list|
|
137
|
+
list.exclude('lib/haml/template/*.rb')
|
138
|
+
list.exclude('lib/haml/helpers/action_view_mods.rb')
|
139
|
+
end.to_a
|
140
|
+
t.options += FileList.new('yard/*.rb').to_a.map {|f| ['-e', f]}.flatten
|
141
|
+
t.options << '--files' << FileList.new('*') do |list|
|
142
|
+
list.exclude(/(^|[^.a-z])[a-z]+/)
|
143
|
+
list.exclude('README.md')
|
144
|
+
list.exclude('REVISION')
|
145
|
+
list.exclude('TODO')
|
146
|
+
end.to_a.join(',')
|
147
|
+
end
|
148
|
+
Rake::Task['yardoc'].instance_variable_set('@comment', nil)
|
149
|
+
|
150
|
+
desc "Generate Documentation"
|
151
|
+
task :doc => :yardoc
|
152
|
+
rescue LoadError
|
153
|
+
desc "Generate Documentation"
|
154
|
+
task :doc => :rdoc
|
155
|
+
task :yardoc => :rdoc
|
144
156
|
end
|
145
157
|
|
146
158
|
# ----- Coverage -----
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.22
|