Skip to content

kantele/k-less

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Derby plugin to add Less support

Usage

Right after creating your Derby app, add:

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

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

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

index.less

body{
  padding: 0;
  margin: 0;
}  

About

Derby plugin to add Less support

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.7%
  • CSS 5.3%