Stylus precompiler for Kanso
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
node_modules
src
Cakefile
README.md
kanso.json

README.md

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
  }