You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies for dropping the ball on this issue. I checked out ScalaKata on Github and managed to recreate the issue.
The issue occurs when the target directory for sbtjs (resourceManaged) occurs inside the source directory. The defaults for sbtjs may need a bit of tweaking to prevent this happening so often. The default source directory is:
(sourceDirectory in (Compile, JsKeys.hs) <<= (sourceDirectory in Compile)
which evaluates to src/main. You were setting the target directory to:
(resourceManaged in (Compile, JsKeys.js)) <<= (sourceDirectory in Compile)(_ /"webapp")
which evaluates to src/main/webapp. Every time you ran sbtjs it picked up a new source file and recompiled it relative to the webapp directory. The workaround is, of course, to manually specify a source directory outside of src/main/webapp.
From a plugin design standpoint, I'm expecting people to override sourceDirectory and resourceManged, which is why I've not noticed this before. It would be better to have src/main/js as a default source directory and something like target/scala_x.y/js as a default target directory, which would avoid such errors.
with this setting
(resourceManaged in (Compile, JsKeys.js)) <<= (sourceDirectory in Compile)(_ / "webapp"),
running js command will created nested directories
The text was updated successfully, but these errors were encountered: