3

I have IntelliJ Ultimate Edition and I'm compiling .scss files to .css. The problem is that every .scss file is compiled to .css in the same folder. I don't want that.

My folder structure is like so:

assets -- css ---- main.css -- scss ---- folder -------icons.scss -------elements.scss ---- folder -------navigation.scss ---- main.scss

The main.scss contains all the necessary files to compile to .css. But I ONLY want to compile main.scss to ../css/main.css when I make changes in one of these files/folders in this structure. How can I do that? Thanks so much.


Current settings in the Edit Watcher window in IntelliJ:

Program: D:\Program Files (x86)\Ruby22\bin\scss.bat

Arguments: --no-cache --update $FileName$:$FileNameWithoutExtension$.css

Output paths to refresh: $FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map

Working directory: C:\localhost\www\website\assets\sass

Ewinnn
  • 327
  • 3
  • 14

2 Answers2

6

Try changing your watcher as follows:

Arguments: --no-cache --update $FileName$:$ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css
Output paths to refresh: $ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css:$ProjectFileDir$/assets/css/$FileNameWithoutExtension$.css.map

If your main.scss imports all your partial .scss files, and Track only root files is enabled in file watcher settings, the ../css/main.css will be created/updated when you make changes in any of these files

lena
  • 90,154
  • 11
  • 145
  • 150
0

I am having folder structure as given below. all partial.scss file imported in ecom-styles.scss

assets
-- css
---- ecom-styles.css.css
-- scss
---- _file1.scss
---- _file2.scss
---- _file3.scss
---- _file4.scss
---- ecom-styles.scss

I changed my watcher in IntelliJ as follows and it works for me

Arguments: $FileName$ $FileParentDir$/css/$FileNameWithoutExtension$.css
Output paths to refresh: $ProjectFileDir$/css/$FileNameWithoutExtension$.css:$ProjectFileDir$/css/$FileNameWithoutExtension$.css.map
Jitendra Rathor
  • 607
  • 8
  • 11