Julian H. Lam
Julian H. Lam

Reputation: 26134

Using less-middleware to compile multiple source CSS files into one?

In my Node.js application, I am using less-middleware to compile the LESS files into CSS files. Works great with single files:

app.use(require('less-middleware')({ src: path.join(__dirname, '../', '/public/css') }));

However, I was wondering if it were possible to take two source .less files, and compile (and optinally minify) them into one single .css file.

Upvotes: 1

Views: 1202

Answers (1)

Julian H. Lam
Julian H. Lam

Reputation: 26134

Got it working using @import:

style.less

... LESS code...

style2.less

... more LESS...

combined.less

@import "style";
@import "style2";

via Join two .less files into one css file

Upvotes: 2

Related Questions