I am currently developing the front-end/webapp for an embedded server (packaged in a .jar file, running as Tomcat) with AngularJs. The server has some API Endpoints which i want to be able to use in the front-end.
My current approach is to use webjars to load the angularjs version of my choice and then just build the application inside the webapp folder. The structure is like this:
├───src
│ ├───main
│ │ ├───docker
│ │ ├───java
│ │ │ └───com
│ │ │ └───...
│ │ ├───resources
│ │ └───webapp
│ │ └───public
│ │ ├───css
│ │ └───js
│ │ └───controllers
└───target
├───classes
│ ├───com
│ │ └───...
│ └───public
│ ├───css
│ └───js
│ └───controllers
├───generated-sources
│ └───annotations
├───generated-test-sources
│ └───test-annotations
└───test-classes
└───com
└───...
The files i am editing are inside the src/main/webapp/public folder and they are getting "compiled" into the target/classes/public folder.
If i want to reload a file while the server is running i have to execute Run -> Reload Changed Classes
, which works reasonable fine while developing.
But since i initially come from "standalone" AngularJs development i became accustomed to having real livereload and a build chain which minifies and concatenates the js/css files for optimization (grunt, bower).
Now i already looked into wro4j and was able to set it up just fine. The one thing which is still missing there for me is the hot-reloading. Even the above approach is no longer working with wro4j and thus the only option was to recompile the whole application to see changes inside css/javascript or HTML. Is there an easy way around this?
My preferred way would be to work on the unminified/unconcatenated version while developing (running the server in debug) and only execute the whole build-chain when the application is deployed (or just Run)
What are my options?