Project

lessr

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Lessr makes LESS integration with your Rails app easy, a generator to download the latest version of LESS and helper methods to include stylesheets in your layouts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.5.2
~> 3.0.0
>= 0.9
~> 2.5.0

Runtime

~> 1.4
~> 3.0
 Project Readme

Lessr

Project Status: Unsupported - The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.

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 <%= javascript_include_tag :defaults %> tag in your header.

Just add the gem to your Gemfile:

gem 'lessr', '1.0.0'

Easy.

Installing The Script

To get the latest copy of of LESS:

rails g less:install

By default the gem will add LESS to your javascript_expansions[:defaults] array, if you've overridden this in you application.rb don't forget to add less.min to it.

Using The Helpers

To include LESS stylesheets add the following in your template header (this must be above the JavaScript tags that include LESS):

<%= less_link_tag :all %>

Other options include:

<%= less_link_tag :all, :recursive => true %>

Or:

<%= less_link_tag 'some/stylesheet' %>

Just like 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

Copyright (c) 2011 Alex Pardoe. See LICENSE.txt for further details.