k-stylus

0.1.2 • Public • Published

Derby plugin to add Stylus support

Usage

Right after creating your Derby app, add:

// 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

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

<Body:>
  <h1>Hello world</h1>

index.styl

body
  padding 0
  margin 0

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i k-stylus

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    2.91 kB

    Total Files

    8

    Last publish

    Collaborators

    • ile