Less4Clients allows Express.js to render .less
files when ?css
is appended to their urls.
-
http://localhost:5000/asd.less
body { a { color:'bada55'; } }
-
http://localhost:5000/asd.less?css
body a { color:'bada55'; }
-
Install it
npm install less4clients
-
With Node.js in JavaScript
// Include Less4Clients require('coffee-script'); less4clients = require('less4clients'); // Setup with your Express Server less4clients.createInstance({ server: null, // your express server (required) publicPath: '...', // the full path to your server root (required) missingAction: false, // the action to forward to when a file is not found cache: false, // whether the responses should be cached compress: false // whether the output should be compressed });
-
With Node.js in CoffeeScript
# Include Less4Clients less4clients = require 'less4clients' # Setup with your Express Server less4clients.createInstance { server: null # your express server (required) publicPath: '...' # the full path to your server root (required) missingAction: false # the action to forward to when a file is not found cache: false # whether the responses should be cached compress: false # whether the output should be compressed }
- v0.1 July 5, 2011
- Initial commit
Licensed under the MIT License Copyright 2011 Benjamin Arthur Lupton