Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable IntelliJ hotswap of html and javascript files

Tags:

I'm fairly new to IntelliJ and I'm using it to develop an AngularJS / Java web application. When I make changes to HTML or JavaScript code, I always have to restart the app server (I'm using Jetty). Is there a config or plugin that provides hotswap for HTML/JS/CSS files?

I'm using IntelliJ 12 Ultimate edition.

like image 273
Dr. Mike Hopper Avatar asked Aug 28 '13 15:08

Dr. Mike Hopper


People also ask

How do I enable HotSwap in IntelliJ?

Reload all files Recompilation happens automatically if the Build project before reloading classes option is enabled in Settings/Preferences | Build, Execution, Deployment | Debugger | HotSwap. If this option is disabled, you need to recompile the files before reloading (Build | Recompile Ctrl+Shift+F9 ).

How do I enable JavaScript in IntelliJ?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | JavaScript. The JavaScript page opens. From the list, choose one of the supported JavaScript language versions: ECMAScript 5.1.

Can I use IntelliJ for HTML and CSS?

By default, IntelliJ IDEA shows on-the-fly preview only for HTML and CSS code. To enable Live Edit in JavaScript, select the JavaScript, HTML and CSS option.

How do I get HTML on IntelliJ?

From the main menu, select File | New, and then select HTML File from the list. IntelliJ IDEA creates a stub file based on the HTML file template and opens it in the editor.


2 Answers

I had the same problem but I already fixed it. You can follow this steps:

  1. Go to Help->Find Action
  2. Type "Registry".
  3. Find and mark : “compiler.automake.allow.when.app.running”.
  4. Close the Dialog.
  5. Go to "Settings->Build, Execution, Deployment->Compiler".
  6. Mark "Build project automatically".
  7. Apply changes.
  8. Go to Spring Boot Configuration and if everything goes well it will display a warning about "background compilation", Run your Spring Boot Application and you should be able to see your statisc's files changes when refresh your browser.

Hope it helps.

like image 161
Rafael Reyes Avatar answered Sep 28 '22 03:09

Rafael Reyes


You need the option "Update resources". You should be able find this option in your server Run/Debug configuration.

like image 38
chalimartines Avatar answered Sep 28 '22 02:09

chalimartines