Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParadoxThemePlugin not working under Windows #369

Open
krchniam opened this issue Sep 13, 2019 · 0 comments
Open

ParadoxThemePlugin not working under Windows #369

krchniam opened this issue Sep 13, 2019 · 0 comments

Comments

@krchniam
Copy link

When developing custom theme on Windows minimal webjar assets are not included in theme resources.

referencedWebjarAssets returns all referenced assets:

[info] Set(lib/foundation/dist/css/foundation.min.css, lib/jquery/jquery.min.js, lib/foundation/dist/js/foundation.min.js, lib/foundation/dist/css/foundation-prototype.min.cs
s, lib/foundation/dist/css/foundation-float.min.css)

Accoring to show webModules / mappings all referenced resources are on classpath:

[info] * (C:\Git\nczi-paradox\theme\target\web\web-modules\main\webjars\lib\foundation\dist\css\foundation-float.min.css,lib\foundation\dist\css\foundation-float.min.css
)
[info] * (C:\Git\\nczi-paradox\theme\target\web\web-modules\main\webjars\lib\foundation\dist\css\foundation-prototype.min.css,lib\foundation\dist\css\foundation-prototype
.min.css)
[info] * (C:\Git\\nczi-paradox\theme\target\web\web-modules\main\webjars\lib\foundation\dist\css\foundation.min.css,lib\foundation\dist\css\foundation.min.css)
[info] * (C:\Git\nczi-paradox\theme\target\web\web-modules\main\webjars\lib\foundation\dist\js\foundation.min.js,lib\foundation\dist\js\foundation.min.js)
...
[info] * (C:\Git\nczi-paradox\theme\target\web\web-modules\main\webjars\lib\jquery\jquery.min.js,lib\jquery\jquery.min.js)

But when compared in ParadoxThemePlugin in WebKeys.exportedMappings with include(path) there is no match, because referencedWebjarAssets are using URL slash /, but webModules / mappings are using Windows file separator \.

Our current workaround is to override referencedWebjarAssets and normalize it to file separator slashes with help of SbtWeb.path:

Assets / referencedWebjarAssets ~= (_.map(SbtWeb.path(_)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant