Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appfolio/ruby_css_lint
Ruby repackaging of CSS Lint
https://github.com/appfolio/ruby_css_lint
Last synced: about 2 months ago
JSON representation
Ruby repackaging of CSS Lint
- Host: GitHub
- URL: https://github.com/appfolio/ruby_css_lint
- Owner: appfolio
- License: other
- Created: 2012-06-21T02:02:23.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T22:06:46.000Z (almost 3 years ago)
- Last Synced: 2024-04-16T00:52:01.893Z (9 months ago)
- Language: JavaScript
- Size: 1.18 MB
- Stars: 3
- Watchers: 148
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE.txt
Awesome Lists containing this project
README
= ruby_css_lint
A repackaging of [CSS Lint](https://github.com/stubbornella/csslint) for use with Rails.
If you're using Rails 3.1, you probably want to run css lint on your precompiled assets. Compile them:
rake assets:precompileTo install Ruby CSS Lint, Add it to your gemfile
gem 'ruby_css_lint'And after a bundle install, run it:
rake css_lint:runYou probably want more control over things, so generate a config file:
rake css_lint:generate_configYou will find the config file at config/initializers/css_lint.rb.
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.
module RubyCssLint
def self.ruleset_classifications
{
"floats" => RubyCssLint::WARNING,
}
end
def self.location_of_custom_rules(rails_root)
["#{rails_root.to_s}/test/css_lint/*.js"]
end
def self.location_of_css_files(rails_root)
[rails_root.to_s+"/public/assets/application.css"]
end
end
== Copyright
Copyright (c) 2012 AppFolio, inc. See LICENSE.txt for
further details.