RETIRED, further work has moved to Debian project infrastructure
Go to file
robotis cb291c5e80 Fix for issue 31. hsl(a) processing on floats. 2014-02-18 12:00:07 +00:00
lesscpy Fix for issue 31. hsl(a) processing on floats. 2014-02-18 12:00:07 +00:00
scripts Move bin/ to scripts/ 2014-02-02 18:01:41 +01:00
test Fix for issue 31. hsl(a) processing on floats. 2014-02-18 12:00:07 +00:00
.gitignore Update after review. 2014-02-18 11:24:00 +02:00
.travis.yml Produce code coverage results and publish to coveralls.io 2014-02-06 17:50:20 +01:00
AUTHORS Add AUTHORS file 2014-02-02 18:30:13 +01:00
LICENSE initial commit 2012-01-28 14:52:09 +00:00
MANIFEST.in Add test-requirements.txt 2014-02-02 17:35:38 +01:00
README.rst Add additional badges (coveralls, license, wheel support) 2014-02-06 17:51:40 +01:00
requirements.txt Add support for py3. 2014-02-16 17:48:07 +02:00
setup.cfg Support publishing wheels 2014-02-02 18:01:40 +01:00
setup.py Fix setup.py url 2014-02-05 15:56:17 +01:00
test-requirements.txt Add 'coverage' 2014-02-06 17:50:07 +01:00
tox.ini Use nose 2014-02-02 18:30:26 +01:00

README.rst

LESSCPY

image

image

image

image

Wheel Status

License

Python LESS Compiler.

A compiler written in Python for the LESS language. For those of us not willing or able to have node.js installed in our environment. Not all features of LESS are supported (yet). Some features wil probably never be supported (JavaScript evaluation). This program uses PLY (Python Lex-Yacc) to tokenize / parse the input and is considerably slower than the NodeJS compiler. The plan is to utilize this to build in proper syntax checking and perhaps YUI compressing.

This is an early version, so you are likly to find bugs.

For more information on LESS:

http://lesscss.org/ or https://github.com/cloudhead/less.js

Development files:

https://github.com/lesscpy/lesscpy

Supported features

  • Variables
  • String interpolation
  • Mixins (nested, calls, closures, recursive)
  • Guard expressions
  • Parametered mixins (class / id)
  • @arguments
  • Nesting
  • Escapes ~/e()
  • Expressions
  • Keyframe blocks
  • Color functions (lighten, darken, saturate, desaturate, spin, hue, mix,

    saturation, lightness)

  • Other functions (round, increment, decrement, format '%(', ...)
  • Keyframe blocks

Differences from less.js

  • All colors are auto-formatted to #nnnnnn. eg, #f7e923
  • Does not preserve CSS comments

Not supported

  • JavaScript evaluation

Requirements

  • Python 2.6, 2.7, or 3.3
  • ply (Python Lex-Yacc) (check requirements.txt)

Installation

To install lesscpy from the Python Package Index, simply:

$ pip install lesscpy

To do a local system-wide install:

python setup.py install

Or simply place the package into your Python path. Or rather use packages provided by your distribution (openSUSE has them at least).

Compiler script Usage

usage: lesscpy [-h] [-v] [-I INCLUDE] [-V] [-x] [-X] [-t] [-s SPACES] [-o OUT]
               [-r] [-f] [-m] [-D] [-g] [-S] [-L] [-N]
               target

LessCss Compiler

positional arguments:
  target                less file or directory

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -I INCLUDE, --include INCLUDE
                        Included less-files (comma separated)
  -V, --verbose         Verbose mode

Formatting options:
  -x, --minify          Minify output
  -X, --xminify         Minify output, no end of block newlines
  -t, --tabs            Use tabs
  -s SPACES, --spaces SPACES
                        Number of startline spaces (default 2)

Directory options:
  Compiles all \*.less files in directory that have a newer timestamp than
  it's css file.

  -o OUT, --out OUT     Output directory
  -r, --recurse         Recursive into subdirectorys
  -f, --force           Force recompile on all files
  -m, --min-ending      Add '.min' into output filename. eg, name.min.css
  -D, --dry-run         Dry run, do not write files

Debugging:
  -g, --debug           Debugging information
  -S, --scopemap        Scopemap
  -L, --lex-only        Run lexer on target
  -N, --no-css          No css output

License

See the LICENSE file