Beispiel #1
0
 public PreprocessorWatcher(string originalExtension, string compliedExtension, string watcherPath) : base(watcherPath)
 {
     this.originalExtension         = originalExtension;
     externalWatcherProcess         = WatcherComplier.Run();
     externalWatcherProcess.Exited += (s, e) => {
         if (!exitRequested)
         {
             RestartCompiler();
         }
     };
     GenericFilter = $"*{compliedExtension}";
     FileFilter    = file =>
     {
         var originalFile = GetOriginalFilePath(file);
         if (originalExtension == ".scss")
         {
             return(true);
         }
         if (originalFile.EndsWith(".d.ts"))
         {
             return(false);
         }
         return(!cache.Contains(originalFile));
     };
 }
Beispiel #2
0
 public PreprocessorWatcher(string originalExtension, string compliedExtension, string watcherPath) : base(watcherPath)
 {
     this.originalExtension = originalExtension;
     externalWatcherProcess = WatcherComplier.Run();
     GenericFilter          = $"*{compliedExtension}";
     FileFilter             = file =>
     {
         var originalFile = GetOriginalFilePath(file);
         return(!cache.Contains(originalFile));
     };
 }