Fix LESS to import a la node require algorithm

npm install npm-less
1 downloads in the last day
10 downloads in the last week
51 downloads in the last month


<!-- build status dependency status

browser support --> Fix LESS to import a la node require algorithm


var http = require("http")
var path = require("path")
// Simple http router
var Router = require("routes-router")
// Simple static file server
var ecstatic = require("ecstatic")

var ServeLess = require("npm-less/serve")

var router = Router()

// ServeLess(rootFolder) returns a http handler
// to server less files. The suggestion is to
// serve /less/foo as /styles/foo/index.js or
// /less/bar as /styles/bar.js
    ServeLess(path.join(__dirname, "styles")))
// static server to serve html page for example
router.addRoute("/", ecstatic({
    root: path.join(__dirname, "static"),
    autoIndex: true

var server = http.createServer(router)

server.listen(9024, function () {
    console.log("demo server listening on port 9024")


npm install npm-less


  • Raynos

MIT Licenced

npm loves you