File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
editor/src/clj/editor/code Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 25
25
[editor.fs :as fs]
26
26
[editor.graph-util :as gu]
27
27
[editor.resource :as resource]
28
+ [editor.resource-node :as resource-node]
28
29
[editor.ui :as ui]
29
30
[editor.workspace :as workspace]
30
31
[internal.java :as java]
56
57
57
58
(defn- make-temporary-compile-directory! [transpiler all-source-save-datas]
58
59
(let [dir (fs/create-temp-directory! (str " tr-" (.getSimpleName (class transpiler))))]
59
- (run! (fn [{:keys [resource content dirty?] }]
60
+ (run! (fn [{:keys [resource dirty] :as save-data }]
60
61
(let [file (io/file dir (resource/path resource))]
61
62
(io/make-parents file)
62
- (if content
63
- (spit file content)
63
+ (if-some [modified- content ( resource-node/save-data-content save-data)]
64
+ (spit file modified- content)
64
65
(with-open [is (io/input-stream resource)]
65
66
(io/copy is file)))
66
- (when-not dirty?
67
+ (when-not dirty
67
68
(.setLastModified file (.lastModified (io/file resource))))))
68
69
all-source-save-datas)
69
70
dir))
74
75
all-sources (conj source-code-save-datas build-file-save-data)
75
76
workspace (resource/workspace (:resource build-file-save-data))
76
77
proj-path->node-id (pair-map-by (comp resource/proj-path :resource ) :node-id all-sources)
77
- use-project-dir (every? (fn [{:keys [resource dirty? ]}]
78
- (and (not dirty? ) (resource/file-resource? resource)))
78
+ use-project-dir (every? (fn [{:keys [resource dirty]}]
79
+ (and (not dirty) (resource/file-resource? resource)))
79
80
all-sources)
80
81
; ; We transpile to lua from the project dir only if all the source code files exist on disc. Since
81
82
; ; some source file may come as dependencies in zip archives or modified in memory without saving
You can’t perform that action at this time.
0 commit comments