My Profile Photo

Hao's Keeper


A blog to place memos


Auto Compile SCSS IN Intellij IDEA

  1. Install plugin: File Watchers

  2. 裝好了才會在 Setting -> Tools 裡面看到 File Watchers

  3. 直接按 Command + N 新增(新版的 IDEA 沒有看到對應的 template)

  4. 重點是 Argument:
    $FileDir$/$FileName$:$FileDir$/../css/$FileNameWithoutExtension$.css --style compressed

  5. Output paths to refresh 裡輸入: $FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map

  6. 把「Working Directory and Environment Variables」展開,
    在「Woring Directory」裡輸入: $FileDir$