Skip to content

Commit 5d2417a

Browse files
committed
Updating README
1 parent 95677de commit 5d2417a

File tree

1 file changed

+27
-35
lines changed

1 file changed

+27
-35
lines changed

README.rdoc

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,41 @@
11
= ruby_css_lint
22

3-
A repackaging of CSS Lint [https://github.com/stubbornella/csslint] for use with Rails.
3+
A repackaging of [CSS Lint](https://github.com/stubbornella/csslint) for use with Rails.
44

55
If you're using Rails 3.1, you probably want to run css lint on your precompiled assets. Compile them:
6-
```ruby
7-
rake assets:precompile
8-
```
6+
rake assets:precompile
97

108

119
To install Ruby CSS Lint, Add it to your gemfile
12-
```ruby
13-
gem 'ruby_css_lint'
14-
```
15-
And after a bundle install, run it:
16-
```ruby
17-
rake css_lint:run
18-
```
19-
20-
You probably want more control over things, so generate a config file:
21-
```ruby
22-
rake css_lint:generate_config
23-
```
24-
25-
You will find the config file at ```config/initializers/css_lint.rb```.
26-
27-
You can control the behavior of Ruby CSS Lint by modifying the implementation of the methods ```RubyCssLint::location_of_css_files```, ```RubyCssLint::location_of_custom_rules``` and ```RubyCssLint::ruleset_classifications```.
10+
gem 'ruby_css_lint'
2811

29-
```ruby
30-
module RubyCssLint
31-
def self.ruleset_classifications
32-
{
33-
"floats" => RubyCssLint::WARNING,
34-
}
35-
end
12+
And after a bundle install, run it:
13+
rake css_lint:run
3614

37-
def self.location_of_custom_rules(rails_root)
38-
["#{rails_root.to_s}/test/css_lint/*.js"]
39-
end
4015

41-
def self.location_of_css_files(rails_root)
42-
[rails_root.to_s+"/public/assets/application2.css"]
16+
You probably want more control over things, so generate a config file:
17+
rake css_lint:generate_config
18+
19+
You will find the config file at config/initializers/css_lint.rb.
20+
21+
You can control the behavior of Ruby CSS Lint by modifying the implementation of the methods RubyCssLint::location_of_css_files, RubyCssLint::location_of_custom_rules and RubyCssLint::ruleset_classifications.
22+
23+
module RubyCssLint
24+
def self.ruleset_classifications
25+
{
26+
"floats" => RubyCssLint::WARNING,
27+
}
28+
end
29+
30+
def self.location_of_custom_rules(rails_root)
31+
["#{rails_root.to_s}/test/css_lint/*.js"]
32+
end
33+
34+
def self.location_of_css_files(rails_root)
35+
[rails_root.to_s+"/public/assets/application2.css"]
36+
end
4337
end
44-
end
45-
```
46-
38+
4739

4840
== Copyright
4941

0 commit comments

Comments
 (0)