A
A
Alexander Langolf2014-08-09 15:50:26
Node.js
Alexander Langolf, 2014-08-09 15:50:26

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

1 answer(s)
A
Alexander Langolf, 2014-08-09
@langolf

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 question

Ask a Question

731 491 924 answers to any question