LESS work-flow


#1

I am trying to get Atom to work with LESS and I can’t find the correct way.

This is my folder structure:

/css/main.less

/css/partials/base.less

/css/partials/forms.less

I want to build main.less every time I save a partial but not build the partial itself. How can I do that? I think I tried all packages related to LESS and none of them solved my problem.


#2

If you can’t find a package with the specific feature set you require, you may need to either work with one of the existing packages to implement that functionality or write your own.


#3

Ok, I found why I wasn’t able to make it work.

I am using the package atom-less which I tried before and the only thing I did different is restarting atom after package installation.

Following the instructions of the package is enough to make it work. In my case:

comment on the first line of main.less:
// “out”: “main.css”, “sourcemap”: false, “compress”: true, “autoprefixer”: false

comment on the first line one of the partials:
// “main”: “…/main.less”