lordkain
lordkain

Reputation: 3109

how can I compile less files

I am new to less. It sounds appealing!

Goal:

Setup:

main.less imports variables.less (variables contains different color schema's)

Folder structure
\main.less
\variables.less
\theme\christmass\variables.less
\theme\newyear\variables.less

I want to call lesscss for each variables.less (which contains the different colors)

lesscss main.less main.css
lesscss main.less main{theme}.css path={theme_christmaspad}/variables.less
lesscss main.less main{theme}.css path={theme_newyearpad}/variables.less

Problems:

I cant seem to set the pre-build event of visual studio to compile the css! How can I make this work?

This is the error message:

Error   1   The command "lessc" exited with code 9009

Upvotes: 0

Views: 664

Answers (1)

lordkain
lordkain

Reputation: 3109

I used a different approuch, I did make use of Web Essentials

for every theme i created a file themex.less where I

  1. import main variables (this is not in main file because of error with webessentials)
  2. import main file
  3. import theme variables which ovverrides the main variables

thats it, pretty simple and straightforward.

Upvotes: 1

Related Questions