These are chat archives for less/less.js

15th
Oct 2015
jeong seong dae
@jeongsd
Oct 15 2015 08:04
hi guys how can i less file(not string) render in node js?
Denys Dovhan
@denysdovhan
Oct 15 2015 20:41

@jeongsd smth like this:

var fs = require('fs');
var less = require('less');

fs.readFile('style.less', 'utf-8', function(err, data) {
    if (err) {throw err};
    less.render(data, function(err, output) {
        console.log(output.css);
    });
});

Of course this example is a little bit naive, but it could be a starting point.

jeong seong dae
@jeongsd
Oct 15 2015 21:15
@denysdovhan thank you very much! that helped me