Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
145
rated 0 times [  149] [ 4]  / answers: 1 / hits: 79128  / 9 Years ago, mon, may 18, 2015, 12:00:00

I'd like to run webpack in --watch mode, and run a shell command after each build that synchronizes a folder to another one.



I found this plugin that triggers an event after each build. That works, but the last piece of the puzzle is to trigger a shell command (for syncing) from Javascript. Any pointers on how to achieve this are greatly appreciated.


More From » webpack

 Answers
5

You can easily run any shell command with built-in child_process module. Also you can try some shell libraries for node.js, like Shell.js. It wraps most of default shell for more convenient usage


[#66561] Friday, May 15, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
montana

Total Points: 675
Total Questions: 86
Total Answers: 102

Location: Mali
Member since Fri, Dec 3, 2021
2 Years ago
montana questions
Sat, Sep 19, 20, 00:00, 4 Years ago
Fri, Jan 31, 20, 00:00, 4 Years ago
Thu, Sep 12, 19, 00:00, 5 Years ago
;