petebacondarwin / stylus-precompiler

Stylus precompiler for Kanso

Home Page:http://kan.so/packages/details/stylus-precompiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 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 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 a .styl extension!

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

About

Stylus precompiler for Kanso

http://kan.so/packages/details/stylus-precompiler


Languages

Language:JavaScript 54.7%Language:CoffeeScript 42.8%Language:Ruby 2.5%