File Watcher not triggering
Answered
Hi folks,
I'm trying to set up my file watcher with scss, trying to make it transpile bootstrap. However, I can't figure out why it will not trigger on anything.
My settings are:
My project structure is basically looking like (leaving out lots of bootstrap stuff):
.
├── css/
│ ├── bootstrap/
│ └── _bootstrap.scss
└── index.html
When running scss --no-cache --update _bootstrap.scss:_bootstrap.css on the commandline it transpiles just as expected. What am I doing wrong?
Please sign in to leave a comment.
Is _bootstrap.scss the only .scss file in your project? Files with underscore prefix are treated as partials:
`If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore`
so, no .css for such files are produced by default. You need to either rename`_bootstrap.scss` to `bootstrap.scss`, or add `
COMPILE_PARTIAL=true
` variable to your file watcher settings;Also, make sure that "Track only root files" is off.
see the comments in https://youtrack.jetbrains.com/issue/WEB-13459
Thanks for explaining, I finally got it working, _bootstrap.scss was indeed not the only file in the project. Renaming _bootstrap.scss to bootstrap.scss fixed it.
Adding COMPILE_PARTIAL to the environment variables worked! This needs to be in the documentation!