4

If I add a "File Watcher" to compile .less files into .css files in webstorm with the default option it makes the .less file becomes a "node" and the .css file is created inside it.

The macro system seems to me a little tricky, I just want to create the .css file inside the same "style" folder in which the .less file is.

Basically now I have a structure like this:

root
  |style
    |-style.less
      |-style.css

and my goal is to obtain a structure like this:

root
  |style
    |-style.less
    |-style.css

any suggestion?

Ilona
  • 357
  • 3
  • 10
Plastic
  • 9,874
  • 6
  • 32
  • 53
  • Because `.css` file in this case is auto-generated from `.less` file, it juts grouped together. It is done for convenience: if I work with source (`.less`) files .. why do I need to see those autogenerated (`.css`) ones? There is no option to completely disable (or enable) such grouping. But if you want to get rid of it -- edit your File Watcher settings -- `Output path to refresh` field (make it empty, for example). – LazyOne Oct 28 '14 at 10:41
  • Infact i was wondering to edit the File watcher setting, however i tried letting empty the Output path to refresh field but it doesn't make any difference. – Plastic Oct 28 '14 at 13:38
  • IDE must be remembering the grouping relations. I don't know -- try "File | Invalidate Caches", restart IDE. Instead of emptying -- try entering wrong path here. TBH -- I (and most likely devs as well) never though people will actually be asking about disabling it .. when lots of people asking other way around: how to group files with the same name but different extensions under one entry. – LazyOne Oct 28 '14 at 13:52

1 Answers1

2

You will have to edit the 'File Watcher', there is Setting 'Arguments' this is what comes after the lessc command. Put somthing like this:

$FileName$ $FileNameWithoutExtension$.css

this should create your output file (.css) in the same directory.

onetwo12
  • 2,359
  • 5
  • 23
  • 34