In our Play project, we are having this issue.
When we run our javascript tests, it's triggering a compilation of the scala sources.
All the javascripts tests are under test/assets
and any change inside this path shouldn't trigger a compilation of the sources.
This means that this folder is referred somewhere as a source directory. I tried to see in which sbt property this folder could be referred but I didn't find any.
Can anyone give some clues on how to prevent compilation triggering when a file inside this folder is changed?
Use the exclude option in your tsconfig. json file to exclude a folder from compilation in TypeScript. The exclude option changes what the include setting finds and defaults to node_modules and bower_components .
You can use Visual Studio to exclude a file from a solution by context-clicking the file in Solution Explorer and selecting Exclude from Project in the context menu.
To exclude specific files from deploymentIn the Solution Explorer window, right-click the file, and then click Properties. In the Properties window, in the Build Action row, select None.
The watchSources
task seems to contain the files that are tracked for change. To inspect the list of folders/files type the following in sbt:
>show watchSources
I am not sure if this is the simplest solution, but it will remove the test/assets
from within the watchSources
.
watchSources <<= watchSources.map{
t => t.filterNot(x => x.getCanonicalPath.endsWith("test/assets"))
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With