I'm using the Less.css File Watcher with WebStorms and I would like to exclude specific files for compilation.
I have one style.less file that includes all other CSS and only this file should be compiled. How can I do that?
If you need the file watcher to watch changes in a single .less file only, ignoring all changes in other .less files, this can be done using Scopes:
In Settings/Scopes add your custom scope, with needed files/folders excluded (see Scopes (Phpstorm Help) for more info).
In Settings/File Watchers, open your LESS file watcher settings and change the 'Scope' property value from 'Project Files' to your custom scope.
If you need changes in all less files being watched, but have a single style.css generated that would include the styles from all .less files throughout the project, tick 'Track only root files' checkbox in your watcher settings. See the explanation in Help:
When the File Watcher is invoked on a file, Phpstorm detects all the files in which this file is included. For each of these files, in its turn, Phpstorm again detects the files into which it is included. This operation is repeated recursively until Phpstorm reaches the files that are not included anywhere within the specified scope. These files are referred to as root files (do not confuse with content roots).
When this check box is selected the File Watcher runs only against the root files.
When the check box is cleared, the File Watcher runs against the file from which it is invoked and against all the files in which this file is included recursively within the specified scope
Related
I have a style.sass file that #uses several _*.sass partials. That was all working fine. Now I added a _*.scss file (it just contains a map, so I wanted it to be multiline), but editing that file does not trigger a rebuild of the style.sass file. I tried adding a SCSS file watcher too, since I'm not sure how IntelliJ decides what to watch, but that didn't help.
It works fine using Dart-SASS's --watch argument. How do I make IntelliJ do the same?
(Although it's a Play project, I'm using IntelliJ's file watchers because I wanted to be able to use #use, so I needed Dart SASS.)
The watcher can only listen to changes in files of same type (either SASS or SCSS), depending on the watcher settings, so you can't make the watcher work for both .scss and .sass files at the same time unless you use a custom scope with both .sass and .scss files included and set File Type: to Any:
I am currently using Teamcity to automatically build and publish our solution to a directory specified in the system.PublishProfile property (i.e. C:\Deployment Files).
Is it possible that after publishing TC will automatically .zip them into one file with a custom set file name?
When you define Artifacts paths inside General Settings tabs, you can set:
./out/Deploy => %BuildName%.zip
And, inside Parameters, you can specify the BuildName value.
This will produce a zipped artifact.
I have a .less files directory with:
main.less (just import the dependencies)
dep1.less
dep2.less
etc.
I want that modifying a dependency triggers the compilation of the main.less file ONLY.
For now here is my configuration in WebStorm Less watcher. What scope and arguments I need?
Thx to #LazyOne comments I manage to find the right settings.
set the watch scope to the entire folder
put ../$FileNameWithoutExtension$.css at the end of less command arguments
uncheck Create output file from stdout causing empty output file (don't know why)
check Track only root files. Which is not very explicit in my case. Indeed it does not really watch the root file but all the #import dependencies and ONLY COMPILE THE ROOT FILE.
If you prefix your partial files with an underscore
(_dep1.less,_dep2.less)
they wont be compiled. And that doesn't even effect how you call them: #import _dep1.less will import _dep1.less.
I have a stylus file watcher that runs a custom script when a stylus file changes. I'd like to have webstorm/idea re-sync all stylus files after the command completes, but the "output paths to refresh" seems inadequate to the task. That is, it's looking for me to specify a path/file when possibly all stylus files have been updated.
Is there a syntax or option that would cause webstorm to update all files or all files with a specific extension after running a file watcher? If not, any other suggestions for triggering a re-sync (not manually) after executing a file watcher?
EDIT: WebStorm v9.0.3
I am making a project that will be put on a disc to use. This means that all of the files that I call upon have to be on that disc. How and where do I put my files to ensure that they will stay with the project? Does it go in the bin folder? And when I am calling on that file what file path do I use?
In general, the bin folder is not a place you should be storing anything that you want to persist with the project.
When you build, Visual Studio will copy the files needed to run the program into the bin folder, such as libraries and web.config or app.config files.
For other files you want included, add them to your project and set their build action property to Content:
Content - The file is not compiled, but is included in the Content output group.
For example, this setting is the default value for an .htm or other
kind of Web file.