Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Compile Stylus files to CSS (part of the grunt-contrib collection).

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

grunt-contrib-stylus

Compile Stylus files to CSS (part of the grunt-contrib collection). Submitted by Eric Woroshow.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-contrib-stylus

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-contrib-stylus');

Overview

Inside your grunt.js file add a section named stylus. This section specifies the files to compile and the options passed to stylus.

This task comes preloaded with nib.

Parameters

files object

This defines what files this task will process and should contain key:value pairs.

The key (destination) should be an unique filepath (supports grunt.template) and the value (source) should be a filepath or an array of filepaths (supports minimatch).

Note: When the value contains an array of multiple filepaths, the contents are concatenated in the order passed.

options object

This controls how this task (and its helpers) operate and should contain key:value pairs, see options below.

Options

compress boolean

This specifies if we should compress the compiled css.

paths string|array

This specifies directories to scan for @import directives when parsing.

Config Example

stylus: {
  compile: {
    options: {
      compress: true,
      paths: ['path/to/import', 'another/to/import']
    },
    files: {
      'path/to/result.css': 'path/to/source.styl',
      'path/to/another.css': ['path/to/sources/*.styl', 'path/to/more/*.style'],
    }
  }
}

Release History

  • 2012/08/10 - v0.2.0 - Refactored from grunt-contrib into individual repo.
Something went wrong with that request. Please try again.