-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
add webjars thymeleaf template modules #8327
Conversation
udpates jhipster#4339
...ringboot/thymeleaf/template/infrastructure/primary/ThymeleafTemplateModuleConfiguration.java
Outdated
Show resolved
Hide resolved
…hymeleaf/template/infrastructure/primary/ThymeleafTemplateModuleConfiguration.java
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8327 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 2645 2652 +7
===========================================
Files 689 689
Lines 11703 11743 +40
Branches 253 253
===========================================
+ Hits 11703 11743 +40 ☔ View full report in Codecov by Sentry. |
...te/generator/server/springboot/thymeleaf/template/domain/ThymeleafTemplateModuleFactory.java
Outdated
Show resolved
Hide resolved
48e1148
to
06cb484
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know when you want this PR merged (if you don't have the rights to merge it yourself) :-)
@@ -108,6 +108,8 @@ public enum JHLiteModuleSlug implements JHipsterModuleSlugFactory { | |||
SPRING_BOOT_MVC_EMPTY("spring-boot-mvc-empty"), | |||
SPRING_BOOT_THYMELEAF("spring-boot-thymeleaf"), | |||
THYMELEAF_TEMPLATE("thymeleaf-template"), | |||
THYMELEAF_TEMPLATE_HTMX_WEBJAR("thymeleaf-template-htmx-webjars"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion: do we need _WEBJAR
suffix? Maybe THYMELEAF_TEMPLATE_HTMX
is sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. For now let's keep it maybe to express webjars are used
| thymeleaf-template-alpinejs-webjars | | ||
Then I should have files in "src/main/resources/templates/layout" | ||
| main.html | | ||
And I should have "@{/webjars/htmx.org/dist/htmx.min.js}" in "src/main/resources/templates/layout/main.html" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, I observed that in current code, cucumber tests usually tests things in surface (e.g. check that file is present), whereas unit tests on the module factory usually check more finely content of generated files.
Not to say you should change it, I think its fine here since things are quite simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also keep it to make sure the webjars module is really applied.
Yes @murdos I don't have the required rights to merge. Okay to merge from my point of view. |
This PR is the first draft how to handle webjars with the thymeleaf template module.
udpates #4339