Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5920588601
Fetching contributors…

Cannot retrieve contributors at this time

70 lines (50 sloc) 1.599 kb

stylus-precompiler

The stylus-precompiler allows you to author your stylesheets with the CSS superset of Stylus. It supports variables, mixins, and lots of other really useful stuff. The .styl and .stylus files will get compiled and _attached to your couchapp on every build and can even be compressed.

Install

Add stylus-precompiler to your dependencies section in kanso.json.

  ...
  "dependencies": {
    "stylus-precompiler": null,
    ...
  }

run kanso install to fetch the package

Configure

To tell the precompiler which files to transform, add the section stylus, and in a key called compile, list the files you want to process.

  ...
  "stylus": {
    "compile": [ "css/style.styl", ... ]
  }
  ...
  "dependencies": {
    "stylus-precompiler": null,
    ...
  }

Running kanso push will compile the file css/style.styl to css/style.css and upload it to _attachments/css/style.css.

Compression

To enable compression of the output, add the compress flag and set it to true.

  ...
  "stylus": {
    "compile": [ ... ],
    "compress": true
  }

Removing original .styl and .stylus files

You can also remove any .styl files from attachments (if you placed them inside a directory also added as static files), by adding the remove_from_attachments property. This will remove all attachment with .styl and .stylus extensions!

  ...
  "stylus": {
    "compile": [ ... ],
    "remove_from_attachments": true
  }
Jump to Line
Something went wrong with that request. Please try again.