Skip to main content

A helper which automatically compiles LESS files to CSS.

Project description

About

LessCSS is a helper which automatically compiles LESS files to CSS when LESS files are modified. It works with Brubeck and web.py web frameworks. Although it’s not tested on other frameworks such as bottle, it should work without any problems.

Note: You need to install LESS before using this.

Installation

$ pip install lesscss

Usage

from lesscss import LessCSS
LessCSS(media_dir='media', exclude_dirs=['img', 'src'], based=True, compressed=True, output_dir=None)

Parameters

  • media_dir: Directory where you put static/media files such as css/js/img.

  • exclude_dirs: Directories you don’t want to be searched. It’d be pointless to search for less files in an images directory. This parameter is expected to be a list.

  • based: If it’s set True then LessCSS will generate the style-(base60).css version as well (for example; style-dHCFD.css). This is useful if you set expire times of static files to a distant future since browsers will not retrieve those files unless the name is different or the cache has expired. This parameter is expected to be a boolean value.

  • compressed: If it’s set True then LessCSS will minimize the generated CSS files. This parameter is expected to be a boolean value.

  • output_dir: Directory where you put compiled CSS files if different than location of .less file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lesscss-0.1.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page