Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derbyjs/derby-stylus
Derby plugin to add stylus support
https://github.com/derbyjs/derby-stylus
Last synced: about 1 month ago
JSON representation
Derby plugin to add stylus support
- Host: GitHub
- URL: https://github.com/derbyjs/derby-stylus
- Owner: derbyjs
- Created: 2014-05-17T21:27:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T00:52:44.000Z (11 months ago)
- Last Synced: 2024-09-18T17:12:13.911Z (3 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 4
- Watchers: 13
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-derby - derby-stylus - Derby plugin to add Stylus support (Information)
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
```