Assert for Stylus
JavaScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.travis.yml
Readme.md
index.js
index.styl
package.json

Readme.md

Build Status

stylus-assert

Assertions directly in Stylus, using node's own module.

Installation

$ npm install stylus-assert

Javascript API

Obligatory connect/express example.

var connect = require('connect');
var stylus = require('stylus');
var stylusAssert = require('stylus-assert');

var server = connect();

function compile(str, path) {
  return stylus(str)
	.set('filename', path)
	.set('compress', true)
	.use(stylusAssert);
}

server.use(stylus.middleware({
	src: __dirname
  , compile: compile
}));