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

Example: Adding custom JavaScript #5

Open
gsedlacz opened this issue Jul 23, 2019 · 2 comments
Open

Example: Adding custom JavaScript #5

gsedlacz opened this issue Jul 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@gsedlacz
Copy link

gsedlacz commented Jul 23, 2019

Could you please add a custom js file to this project?
It would help to understand where to place frontend resources in this type of project.

I request this feature as I just ran into the issue that resources placed at src\main\resources\META-INF\resources\frontend are not available when running jetty from inside of the project.

@gsedlacz gsedlacz changed the title Adding custom JavaScript Example: Adding custom JavaScript Jul 23, 2019
@caalador
Copy link
Contributor

JavaScript files for add-ons should be in src/main/resources/META-INF/frontend/ or src/main/resources/META-INF/resources/frontend and can then be referenced as @JsModule("./TimeSelector.js").

The folder src/main/resources/META-INF/resources/frontend should be the correct directory if executing the add on as an application as that location should be copied as local resources.

Perhaps when running jetty you didn't execute prepare-frontend goal or the add-on is not found on the classpath for copying of the file contents when executing jetty.

The resource-cheat-sheet named in the README should be correct on the placement of files.

@mstahv
Copy link
Member

mstahv commented Jan 13, 2022

This should be added indeed, or even just the right directory with readme file. Also the current ./frontend directory with its autogenerated content should be removed. It just causes confusion as one really should not use that at all in an add-on project.

@mshabarov mshabarov added the enhancement New feature or request label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

4 participants