private static void OnChanged(object source, FileSystemEventArgs e) { PreventDoubleChangeFileHandle(() => { Debug.WriteLine($"Frontend assets were changed. Changed type: {e.ChangeType}"); _webpackAssets = WebpackConfigParser.GetWebpackAssetsJson(e.FullPath); }); }
public static void Initialize(string path) { _fileName = path; var fileInfo = new FileInfo(path); InitializeWatcher(fileInfo); _webpackAssets = WebpackConfigParser.GetWebpackAssetsJson(_fileName); _previousWriteTime = DateTime.Now; Debug.WriteLine($"Initial Webpack assets was read."); }