Skip to main content

CSS tools recipe for buildout

Project description

Detailed Documentation
======================

================================
CSS Tools recipe for ZC Buildout
================================

falkolab.recipe.csstools is a zc.buildout recipe for building (validation, compressing)
css style sheet sources. The buildout works to writing concatenated
and compressed files from a declarative config.

Buildout Format
===============

Variables
---------

* output-dir -- path to where result should be written.

* config -- path to builder config file

* resource-dir -- not required, used for interpolation of builder config

* section -- output concatenated file for only this section of the 'config'

* output-name -- (for use with 'section') write file to this name

* sourceencoding (optional) -- encoding of the source stylesheet

* targetencoding (optional) -- encoding of the combined stylesheet, default 'utf-8'

* compress -- defines if the combined sheet should be minified, default False

Configuration Format
--------------------

A config file may have multiple uniquely named output files (ie
multiple sections).

A section is formatted in the following fashion::

[styles.css]
root=path/to/where/files/are
license=path/to/license/for/these/libs
include =
first=
styles/color.css
styles/typography.js
styles/layout.js

last=
core/main.js

exclude=
debug/layout-debug.css
#...


The files listed in the `first` variable will be forced to load
*before* all other files (in the order listed). The files in `last`
variable will be forced to load *after* all the other files (in the
order listed).

The files list in the `exclude` section will not be imported.
If you set `include` variable then `first` and `last` variable will be ignored.

The configuration allows for the interpolation of variables defined in
the config file. '%(resource-dir)s'

Lines commented using '#' will be ignored.

Resolving imports
------------------

Contained import directives in style sheets will be resolved and repleced
by referenced files or urls content:

@import url("color.css");
@import "layout.css";

Imports can't be controlled by bildout configuration
(e.g. first, last, include, exclude lists).


Examples
--------
from file buildout.cfg:

...

[css-builder]
recipe=falkolab.recipe.csstools:builder
resource-dir=${buildout:directory}/src/path/to/package/resources
config=css-builder.cfg
output-dir=${css-builder:resource-dir}/styles
compress=True
targetencoding=utf-8

[css-builder-debug]
recipe=falkolab.recipe.csstools:builder
config=${css-builder:config}
resource-dir=${css-builder:resource-dir}
output-dir=${css-builder:output-dir}
output=${css-builder:output-dir}/ts-debug.css
compress=False
section=ts.css
...

CHANGES
=======

1.0.2 (2009-06-04)
------------------
- Some minor changes

1.0.1 (2009-03-11)
------------------

- * BUGFIX: can't add license text

1.0.0 (2009-03-05)
------------------

- First release

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

falkolab.recipe.csstools-1.0.2-py2.6.egg (14.4 kB view details)

Uploaded Egg

falkolab.recipe.csstools-1.0.2-py2.5.egg (14.4 kB view details)

Uploaded Egg

falkolab.recipe.csstools-1.0.2-py2.4.egg (14.5 kB view details)

Uploaded Egg

File details

Details for the file falkolab.recipe.csstools-1.0.2-py2.6.egg.

File metadata

File hashes

Hashes for falkolab.recipe.csstools-1.0.2-py2.6.egg
Algorithm Hash digest
SHA256 7e49224447375b249b54416be545406b5b097d306bacb318d10e9e8122a8bc41
MD5 624e937eba0d9ba65662f2b7568a4e30
BLAKE2b-256 48e5f16193decb54508f59e144692821d79da81be693b33fd0ce5e916928e52c

See more details on using hashes here.

File details

Details for the file falkolab.recipe.csstools-1.0.2-py2.5.egg.

File metadata

File hashes

Hashes for falkolab.recipe.csstools-1.0.2-py2.5.egg
Algorithm Hash digest
SHA256 7a42a8a56c2185c3e325cd836edfed86a453eb7d34a2b22ae933fed9b3f2cd1b
MD5 21f67b8a957f377fe2c4cd716e1fad8d
BLAKE2b-256 80e9f0cd19757ba4286197a59c2fc31532cc097465cb03828fe5458f78412e56

See more details on using hashes here.

File details

Details for the file falkolab.recipe.csstools-1.0.2-py2.4.egg.

File metadata

File hashes

Hashes for falkolab.recipe.csstools-1.0.2-py2.4.egg
Algorithm Hash digest
SHA256 ef2a58b90bec80ed6998866911842c27f68a52b150b2a6c3005898aacd0248f1
MD5 37afd03b5ba39ce4ae993b92f09af7e2
BLAKE2b-256 9741ce1cd199ff6a8ea091fd70c72285bc2860027819547d67d3791fb6f4ff9f

See more details on using hashes here.

Supported by

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