Answer the question
In order to leave comments, you need to log in
Webstorm File watcher: how to pass a file that has changed to an external script?
I want to set up my compilation of jade files on the project, so I'm trying to set up my watcher. I have a script in the project that will take the changed file and compile it in its own way through the node. How can I pass this file to an external script? Is it possible at all?
Answer the question
In order to leave comments, you need to log in
The solution was found. It is necessary to put $FilePath$ in the watcher arguments. This whole thing happens through node.js, so in the external script you need to use the node process object, and specifically process.argv. process.argv[2] - there will always be our file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question