Git Product home page Git Product logo

addon_less_compiler's Introduction

Less Compiler

"LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. LESS runs on both the client-side (IE 6+, Webkit, Firefox) and server-side, with Node.js and Rhino."


This package utilizes the LESSphp library for compiling

Directions

  1. Create a less DIR in the root of your active theme
  • Create less files in a working directory pattern relative to your root path
  1. Run compile job

Compiling

yourtheme > less > styles > style.less

becomes

files > css > style.css

##API ###link() lessHelper::link() method returns all inputted in link format

$less = loader::helper('less','less_compiler');
echo $less->link('test.css','test.less','etc');

renders into

<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/test.css">
<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/etc">

###as string

Using the object in string context returns the queue.

$less = loader::helper('less','less_compiler');
$less->add('derp.less','test.css');
$less->add('derp.less');
$less->add('herp.css');
$less->add('derp.less');
echo $less;

renders into

<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/derp.css">
<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/test.css">
<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/herp.css">

###invoke

Invoking the object prints out the queue

$less = loader::helper('less','less_compiler');
$less->add('derp.less');
$less->add('derp.less');
$less->add('herp.css');
$less->add('derp.less');
$less();

renders into

<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/derp.css">
<link rel="stylesheet" type="text/css" href="http://local.concrete.com/files/CSS/herp.css">

If you'd like to see where files are that are being tracked, go to the dashboard page. Every less file that Less Compiler picks up will be listed in the order that they will compile.

NOTE: Less Compiler ONLY looks in the active themes directory!

addon_less_compiler's People

Contributors

korvinszanto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.