Diem plugins syndication

toLessCssPlugin

LESS stylesheets (CSS) in your DIEM-Application!

Use your less-stylesheets in your DIEM-Application!

Installation

  • In a console, from your project root dir, run:
git clone git://github.com/thehe/diem-toLessCssPlugin.git plugins/toLessCssPlugin  
  • In config/ProjectConfiguration.class.php, add toLessCssPlugin to the list of enabled plugins:
class ProjectConfiguration extends dmProjectConfiguration
{  
  public function setup()  
  {  
    parent::setup();  
 
    $this->enablePlugins(array(  
      // your enabled plugins  
      'toLessCssPlugin'  
    ));  
  • In a console, from your project root dir, run:
php symfony dm:setup  

Dependencies

Install LESS-Compiler on the webserver - see http://lesscss.org/#usage for details.

Make lessc executable by the webserver and (if it is not in %PATH%) change the name and path in app.yml.

Configuration

Add this configuration in
apps/front/config/app.yml

all:  
  lessCss:  
    # executable can be the less-compiler executable or empty for client-side rendering (not supported yet)  
    executable: lessc  
    # less-javascript file (see less.org)  
    lessjs: less-1.4.2.min.js  

Usage

Simply put your less file(s) in view.yml (eg. apps/front/config/view.yml) like

default:  
  http_metas:  
    content-type: text/html  
  stylesheets:  
    - layout  
    - mystyle.less  
    - main  
    - markdown  
  javascripts:  
    - front  
  has_layout:     true  
  layout:         layout  

In the example above, the file mystyle.less will be automatically compiled to mystyle.css and included instead of the .less-file.

    Add a comment

    Create an issue
    Impossible to fetch issues for this plugin.
    Impossible to get this plugin changelog.
    See more commits

    toLessCssPlugin, created on September 29, 2013 by to-rparker, used by 0 projects

    Fork Diem on GitHub