mrcrowl / vscode-easy-less

Easy LESS extension for Visual Studio Code
MIT License
68 stars 22 forks source link

How to compile only one of them? #68

Closed percyho closed 4 years ago

percyho commented 4 years ago

I have two less files. How to compile only one of them?

mrcrowl commented 4 years ago

Hi there. Can you provide some more details on what you're wanting? Why do you want one file compiled and not the other? Is there any relationship between these files?

percyho commented 4 years ago

Hi there. Because one file is imported into another, I don't want to compile them.

mrcrowl commented 4 years ago

Okay. You can use the // main: <some-filename.less> directive for this.

You put this comment at the top of the imported file. That tells EasyLESS which file to compile instead of the file itself. That way, whenever you save the imported file, the "main" file gets recompiled.

More details on this in the readme.