Less is amazing and I want to use to node.js because using less.js is not a good performance. I testing purpos i'm using xamp on windows and I install node.js but where and what i should write.. I install express.js npm install -g express
and less npm install -g less
If you're using expressjs you can install
npm install less-middleware
and then in your application (app.js)
var lessMiddleware = require('less-middleware');
then you have to tell expressjs to use less-middleware by doing
app.configure(function(){
//other configuration here...
app.use(lessMiddleware({
src : __dirname + "/public",
compress : true
}));
app.use(express.static(__dirname + '/public'));
});
now in your [appname]/public/stylesheets/custom.less
gets translated into regular css custom.css
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With