ttadej
8 years agoAdvisor
Local javascript development strategies?
Our team is trying to develop a solution to dev javascript locally. I don't think there is a solution for developing the @liaAddScript Javascript/jQuery in Freemarker files locally because that is bundled during deployment. I'm more interested in standalone files in web/html/assets/js or src/ - we have files in both places (one is a bundle and the others are standalone files).
We'd like to do something like this:
- Serve up files from a local port
- Manipulate the DOM to remove the static file includes from the hosted site and replace with the local versions
- Watch file changes and reload accordingly
We're working on this now, but I'd be interested to hear if others have found a good solution. My initial thoughts are that it will require a number of npm packages and some hacks to the way the @includeScript function works in dev environments. Any input is appreciated! Thanks