Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/derbyjs/derby-stylus

Derby plugin to add stylus support
https://github.com/derbyjs/derby-stylus

Last synced: 7 days ago
JSON representation

Derby plugin to add stylus support

Awesome Lists containing this project

README

        

# Derby plugin to add Stylus support

## Usage

Right after creating your Derby app, add:

```js
// Add Stylus support
app.serverUse(module, 'derby-stylus');
```

Make sure this is before any calls to `app.loadStyles()`.

After that you can use `*.styl` files instead of `*.css`

## Example

index.js
```js
var derby = require('derby');
var app = module.exports = derby.createApp('example', __filename);

// Add Stylus support (before loadStyles)
app.serverUse(module, 'derby-stylus');

app.loadViews (__dirname);
app.loadStyles(__dirname);

app.get('/', function(page, model) {
page.render();
});
```

index.html
```html

Hello world


```

index.styl
```stylus
body
padding 0
margin 0
```