Glub is generally a very lightweight compilation.
Go is too heavy, change a small part, compile the words, most of the compilation failed.
It also consumes performance, and has not yet thought of the perfect optimization method.
Temporarily use a timer to listen for 2 seconds, stop 1 seconds, so loop, will reduce some "invalid" compilation
varWatch = require (' Glob-watcher ');varexec = require (' child_process '). exec;varSYS = require (' sys '));varmatchregs=NewArray (9);varGodirpath =Process.env.GODIR;varCommand =Process.env.COMMAND; for(vari=0;i<10;i++){ varPerkey= ""; varTokay= ""; for(varj=0;j<=i;j++) {Perkey+="*"; Tokay=perkey+ "/" +Tokay} Matchregs[i]=godirpath+ "/" +tokay.substring (0,tokay.length-1);}//var t=settimeout (function () {//Console.log (Matchregs)functionStartwatch () {varW=watch (Matchregs,function(evt) {Console.log ("1") Child= EXEC (Command,function(Error, stdout, stderr) {Sys.print (' ERROR: \ n ' + error+ ' \ n '); Sys.print (' stdout: \ n ' + stdout+ ' \ n '); Sys.print (' stderr: \ n ' + stderr+ ' \ n '); }) SetTimeout (function() {w.end (); SetTimeout (function() {startwatch (); },1000) },2000)})}startwatch ()
Nodej and Glub-watcher write the listening Go Project automatically compiled, very chicken