Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derbyjs/derby-less
Derby plugin to add Less support
https://github.com/derbyjs/derby-less
Last synced: about 1 month ago
JSON representation
Derby plugin to add Less support
- Host: GitHub
- URL: https://github.com/derbyjs/derby-less
- Owner: derbyjs
- Created: 2014-05-17T21:28:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-12T06:36:47.000Z (almost 9 years ago)
- Last Synced: 2024-10-13T18:58:59.562Z (2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-derby - derby-less - Derby plugin to add Less support (Information)
README
# Derby plugin to add Less support
## Usage
Right after creating your Derby app, add:
```js
// Add Less support
app.serverUse(module, 'derby-less');
```Make sure this is before any calls to `app.loadStyles()`.
After that you can use `*.less` files instead of `*.css`
## Example
index.js
```js
var derby = require('derby');
var app = module.exports = derby.createApp('example', __filename);// Add Less support (before loadStyles)
app.serverUse(module, 'derby-less');app.loadViews (__dirname);
app.loadStyles(__dirname);app.get('/', function(page, model) {
page.render();
});
```index.html
```html
Hello world
```index.less
```less
body{
padding: 0;
margin: 0;
}
```