![]() |
|
sfLessPhpPlugin - 1.1.2symfony LESS plugin |
|
![]() |
14
users
Sign-in
to change your status |
sfLessPhpPlugin is a plugin for symfony applications. It automatically parses your applications .less files through LESS and outputs CSS files. |
sfLessPhpPlugin is a plugin for symfony applications. It automatically parses your applications .less files through LESS and outputs CSS files.
LESS extends CSS with: variables, mixins, operations and nested rules. For more information, see http://lesscss.org.
| Name | Status | |
|---|---|---|
|
|
lead | moc.liamg <<ta>> tez.reve |
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
| Version | License | API | Released |
|---|---|---|---|
| 1.3.3stable | MIT license | 1.2.5stable | 03/06/2010 |
| 1.3.2stable | MIT license | 1.2.5stable | 24/01/2010 |
| 1.3.1stable | MIT license | 1.2.5stable | 11/12/2009 |
| 1.3.0stable | MIT license | 1.2.4stable | 09/12/2009 |
| Version | License | API | Released |
|---|---|---|---|
| 1.3.3stable | MIT license | 1.2.5stable | 03/06/2010 |
| 1.3.2stable | MIT license | 1.2.5stable | 24/01/2010 |
| 1.3.1stable | MIT license | 1.2.5stable | 11/12/2009 |
| 1.3.0stable | MIT license | 1.2.4stable | 09/12/2009 |
| 1.2.3stable | MIT license | 1.2.3stable | 24/11/2009 |
| 1.2.2stable | MIT license | 1.2.0stable | 11/11/2009 |
| 1.2.1stable | MIT license | 1.2.0stable | 08/11/2009 |
| Version | License | API | Released |
|---|---|---|---|
| 1.3.3stable | MIT license | 1.2.5stable | 03/06/2010 |
| 1.3.2stable | MIT license | 1.2.5stable | 24/01/2010 |
| 1.3.1stable | MIT license | 1.2.5stable | 11/12/2009 |
| 1.3.0stable | MIT license | 1.2.4stable | 09/12/2009 |
| 1.2.3stable | MIT license | 1.2.3stable | 24/11/2009 |
| 1.2.2stable | MIT license | 1.2.0stable | 11/11/2009 |
| 1.2.1stable | MIT license | 1.2.0stable | 08/11/2009 |
| 1.1.3stable | MIT license | 1.1.1stable | 29/10/2009 |
| 1.1.2stable | MIT license | 1.1.1stable | 27/10/2009 |
| 1.1.1stable | MIT license | 1.1.0stable | 17/10/2009 |
| 1.1.0stable | MIT license | 1.1.0stable | 12/10/2009 |
| 1.0.1stable | MIT license | 1.0.0stable | 10/10/2009 |
Array
LESS in symfony.
sfLessPhpPlugin is a plugin for symfony applications. It automatically parses your applications .less files through LESS and outputs CSS files.
In details, sfLessPhpPlugin does the following:
.less) files in data/stylesheets_partial.less) - these can be included with @import in your LESS filesweb/css using the same directory structure as data/stylesheetsLESS extends CSS with: variables, mixins, operations and nested rules. For more information, see http://lesscss.org.
Use this to install sfLessPhpPlugin:
$ symfony plugin:install sfLessPhpPlugin
Use this to install as a plugin in a symfony app:
$ cd plugins && git clone git://github.com/everzet/sfLessPhpPlugin.git
Use this if you prefer to use git submodules for plugins:
$ git submodule add git://github.com/everzet/sfLessPhpPlugin.git plugins/sfLessPhpPlugin
After installation, you need to create directory data/stylesheets. Any LESS file placed in this directory, including subdirectories, will
automatically be parsed through LESS and saved as a corresponding CSS file in web/css. Example:
data/stylesheets/clients/screen.less => web/css/clients/screen.css
If you prefix a file with an underscore, it is considered to be a partial, and will not be parsed unless included in another file. Example:
<file: data/stylesheets/clients/partials/_form.less>
@text_dark: #222;
<file: data/stylesheets/clients/screen.less>
@import "partials/_form";
input { color: @text_dark; }
The example above will result in a single CSS file in web/css/clients/screen.css.
To set the source path (the location of your project LESS files), add in apps/APP/config/app.yml:
all:
sf_less_php_plugin:
path: "/path/to/less/files"
sfLessPhpPlugin rechecks data/stylesheets/*.less at every routes init. To prevent this, add this in your apps/APP/config/app.yml:
prod:
sf_less_php_plugin:
compile: false
sfLessPhpPlugin checks the dates of LESS & CSS files, and will compile again only if LESS file have been changed since last parsing. To prevent this check & to enforce everytime compiling, add this in your apps/APP/config/app.yml:
dev:
sf_less_php_plugin:
check_dates: false
By default, sfLessPhpPlugin uses lessphp library to compile your LESS files. But you can force plugin to use original Ruby lessc compiler (if you have installed LESS gem):
all:
sf_less_php_plugin:
use_lessc: true
And of course, if you use Mac OS & Ruby lessc compiler, you can set it to use Growl notifications with:
all:
sf_less_php_plugin:
use_growl: true
sfLessPhpPlugin provides a set of CLI tasks to help manage your CSS files.
To parse all LESS files and save the resulting CSS files to the destination path, run:
$ symfony less:compile
To delete all compiled CSS (only files, that been compiled from LESS files) files before parsing LESS, run:
$ symfony less:compile --with-clean
If you want to use lessc parser instead of default lessphp, run:
$ symfony less:compile --lessc
If you are using git to version control your code and LESS for all your stylesheets, you can add this entry to your .gitignore file:
web/css/*.css
sfLessPhpPlugin is based on lessphp by leafo (http://github.com/leafo)
LESS is maintained by Alexis Sellier http://github.com/cloudhead
