|  | @@ -62,8 +62,8 @@
 | 
											
												
													
														|  |    (or
 |  |    (or
 | 
											
												
													
														|  |     (some #(string/starts-with? path (str dir "/" %))
 |  |     (some #(string/starts-with? path (str dir "/" %))
 | 
											
												
													
														|  |           ["." "assets" "node_modules"])
 |  |           ["." "assets" "node_modules"])
 | 
											
												
													
														|  | -   (some #(string/ends-with? path (str dir "/" %))
 |  | 
 | 
											
												
													
														|  | -         [".swap" ".crswap" ".tmp"])))
 |  | 
 | 
											
												
													
														|  | 
 |  | +   (some #(string/ends-with? path %)
 | 
											
												
													
														|  | 
 |  | +         [".swap" ".crswap" ".tmp" ".DS_Store"])))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  (defonce allowed-formats
 |  |  (defonce allowed-formats
 | 
											
												
													
														|  |    #{:org :markdown :md :edn :json :css :excalidraw})
 |  |    #{:org :markdown :md :edn :json :css :excalidraw})
 | 
											
										
											
												
													
														|  | @@ -137,6 +137,7 @@
 | 
											
												
													
														|  |        (send file-watcher-chan
 |  |        (send file-watcher-chan
 | 
											
												
													
														|  |              (bean/->js {:type type :payload payload}))))
 |  |              (bean/->js {:type type :payload payload}))))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +(defonce polling-interval 5000)
 | 
											
												
													
														|  |  (defn watch-dir!
 |  |  (defn watch-dir!
 | 
											
												
													
														|  |    [win dir]
 |  |    [win dir]
 | 
											
												
													
														|  |    (when (fs/existsSync dir)
 |  |    (when (fs/existsSync dir)
 | 
											
										
											
												
													
														|  | @@ -144,8 +145,14 @@
 | 
											
												
													
														|  |                            (clj->js
 |  |                            (clj->js
 | 
											
												
													
														|  |                             {:ignored (partial ignored-path? dir)
 |  |                             {:ignored (partial ignored-path? dir)
 | 
											
												
													
														|  |                              :ignoreInitial true
 |  |                              :ignoreInitial true
 | 
											
												
													
														|  | 
 |  | +                            :ignorePermissionErrors true
 | 
											
												
													
														|  | 
 |  | +                            :interval polling-interval
 | 
											
												
													
														|  | 
 |  | +                            :binaryInterval polling-interval
 | 
											
												
													
														|  |                              :persistent true
 |  |                              :persistent true
 | 
											
												
													
														|  | 
 |  | +                            :disableGlobbing true
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |                              :awaitWriteFinish true}))]
 |  |                              :awaitWriteFinish true}))]
 | 
											
												
													
														|  | 
 |  | +      ;; TODO: batch sender
 | 
											
												
													
														|  |        (.on watcher "add"
 |  |        (.on watcher "add"
 | 
											
												
													
														|  |             (fn [path]
 |  |             (fn [path]
 | 
											
												
													
														|  |               (send-file-watcher! win "add"
 |  |               (send-file-watcher! win "add"
 |