Webstorm monitors subdirectories, and compiled files maintain the directory structure of the source files

  node.js, question

My project directory is structured as follows

I hope webstorm’s monitor can help me monitor all. coffee under coffee.
At the same time, we hope that the compiled js can maintain a consistent directory structure.

There are many ways, of course, the most WebStorm way is to use macro.

Suppose first

  • Coffee directory/frontEndDir/coffee/
  • Javascript directory/frontEndDir/coffee/

Then open preference-> tools-> filewatchers and double-click your coffewatcher to edit. Enter in Arguments--output $ProjectFileDir$/frontEndDir/js/$FileDirPathFromParent(coffee)$ --map --compile $FileName$

Complete, praise and attention.