sublime-less2css icon indicating copy to clipboard operation
sublime-less2css copied to clipboard

Allow output dir to be relative to less file being compiled

Open timdouglas opened this issue 11 years ago • 4 comments

Originally asked by @brunodeleo in issue #20:

"is there a way to set the css outputdir relative to the less file being saved instead of being relative to the project folder? This would be great since I really don't use sublime projects, it would be too tedious given my workflow."

Created a new issue to make it easier to track...

timdouglas avatar May 24 '13 09:05 timdouglas

Not quite sure how this should work if you have a project structure where the .less files are divided into subfolders. The result would be having the .css files wind up all over the place. I would be hesitant to add a feature that only works properly for 1 specific kind of project structure.

@timdouglas what is your idea on this?

tbusser-itouch avatar Jun 10 '13 20:06 tbusser-itouch

I wouldn't be worried about supporting a feature that only works for one kind of project structure, as we already do with the auto and shadow settings (in a sense...).

We already know the path to the less file, and it might just be a case of concatenating another path to that, although I doubt it is just that simple. One idea I had when thinking about this was to have (yet) another option relative which would default to project but could be overwritten to less, then we use whatever value is in outputDir and append that to the path of the less to make the output path.

If someone used a project structure with less files in different directories, then in theory that directory structure should be replicated, and if not, then perhaps one of the other outputting options is preferable.

What do you think, am I oversimplifying things too much?

timdouglas avatar Jun 11 '13 07:06 timdouglas

creating two.css files when putting .less into css/less folder and setting path sublime text 2 Settings-User outputDir:"./css"

It creates one css inside css/less and one is outside in css folder

I am using windows plateform

jasminpethani avatar Jun 15 '13 17:06 jasminpethani

Can someone help me use shadow setting to keep css folder structure same as less folder and subfolder? Subfolder files are not compiled into relative folder in css

joaocosta-azores avatar Dec 09 '14 17:12 joaocosta-azores