Lessr is a small gem that provides helper methods to include LESS stylesheets in your templates in the same way you'd normally include CSS stylesheets. It also provides a single generator to download and install the latest version of less.min.js & application configuration to make sure it appears in the
Just add the gem to your Gemfile:
gem 'lessr', '1.0.0'
Installing The Script
To get the latest copy of of LESS:
rails g less:install
By default the gem will add LESS to your
less.min to it.
Using The Helpers
<%= less_link_tag :all %>
Other options include:
<%= less_link_tag :all, :recursive => true %>
<%= less_link_tag 'some/stylesheet' %>
stylesheet_link_tag but without the caching or concatenation (for now).
Contributing to Lessr
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright (c) 2011 Alex Pardoe. See LICENSE.txt for further details.