File Watchers
Good day,
I have a project where I use scss in the following structure:
I use this structure for the frontend:
/css/style.css
For administration:
/___admin___x/css/style.css
I have File Watchers set up in phpstorm as follows:
For the frontend:
Arguments: --style=compressed $FileName$:$ProjectFileDir$/css/$FileNameWithoutExtension$.css Output pats to refresh: $ProjectFileDir$/css/$FileNameWithoutExtension$.css:$ProjectFileDir$/css/$FileNameWithoutExtension$.css.map
For administration:
Arguments: --style=compressed $FileName$:$ProjectFileDir$/___admin___x/css/$FileNameWithoutExtension$.css
Output pats to refresh: $ProjectFileDir$/___admin___x/css/$FileNameWithoutExtension$.css:$ProjectFileDir$/___admin___x/css/$FileNameWithoutExtension$.css.map
But when I edit the css for the frontend, the css in the administration is overwritten, and when I edit the css in the administration, the css in the frontend is overwritten. Where is the problem please?
I've tried setting it up in every way according to the documentation, but it doesn't work the way I need it to.
Thank you
Please sign in to leave a comment.
I have a project where the structure is like this:
Administration:
/project.cz/___admin___x/css/
|-scss/
|-base/
|-components/
|-style.css
Frontend:
/project.cz/css/
|-scss/
|-base/
|-components/
|-style.css
I am unable to set up File Watcher so that I can edit the output from scss especially in the administration part and especially in the frontend part.
For example, if I had /project.cz/___admin___x/css/screen.css and edited the scss files, it would be saved in the /project.cz/___admin___x/css/screen.css folder, but it would also be added to the /project folder .cz/css/screen.css. So in the frontend folder I would then have /css/style.css and /css/screen.css.
Please could you share screenshots of your watchers settings?
Frontend
Administration
Both watchers are configured to watch all
.scss
files in project (the Scope: is set to Project Files). so each time you modify a.scss
file, both watchers are triggered.Please create custom scopes in Settings | Appearance & Behavior | Scopes that only include
.scss
files from the corresponding subprojects and choose these scopes in your file watchers settings.Can I ask you for a precise description of how to set it up so that it works for all projects and doesn't have to be set up for each project separately?
file[ADMIN]:___admin___x/css//*
"ADMIN" is the name of the project.
Thank you
This is a shame, because most projects have the same structure, so everything will need to be set up individually for each project. If I wanted to set the files for JS in this way so that they are compressed into one file, I would also have to do the same for each project separately.