Skip to content

Commit

Permalink
fix single file saving; tag 0.6.0-a2
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jun 21, 2021
1 parent ee535d4 commit d5aa27a
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 16 deletions.
66 changes: 55 additions & 11 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -20170,11 +20170,15 @@
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1596297363141)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297371154) (:text |handle-compact-files!)
|v $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |added-names)
|x $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |removed-names)
|y $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |changed-names)
|f $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343106338) (:text |old-files)
|n $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343122683) (:text |new-files)
|yT $ {} (:type :expr) (:by |S1lNv50FW) (:at 1599733123467)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1599733125142) (:text |:configs)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1599733125773) (:text |db)
|f $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343106338) (:text |old-files)
|x $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |removed-names)
|v $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |added-names)
|yj $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244169940) (:text |filter-ns)
|Z $ {} (:type :expr) (:by |S1lNv50FW) (:at 1596343124647)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343732662) (:text |get-in)
Expand All @@ -20184,10 +20188,7 @@
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343734630) (:text |[])
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343735971) (:text |:ir)
|r $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343737655) (:text |:package)
|yT $ {} (:type :expr) (:by |S1lNv50FW) (:at 1599733123467)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1599733125142) (:text |:configs)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1599733125773) (:text |db)
|y $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297375554) (:text |changed-names)
|y $ {} (:type :expr) (:at 1504777570689)
:data $ {}
|T $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |dispatch!)
Expand Down Expand Up @@ -20365,8 +20366,9 @@
|v $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297781796) (:text |changed-names)
|D $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343141010) (:text |pkg)
|L $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343118541) (:text |old-files)
|P $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343141712) (:text |new-files)
|P $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244134032) (:text |latest-files)
|x $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1599733142405) (:text |configs)
|y $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244173977) (:text |filter-ns)
|v $ {} (:type :expr) (:by |S1lNv50FW) (:at 1596297786437)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297787851) (:text |let)
Expand Down Expand Up @@ -20749,6 +20751,48 @@
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343230908) (:text |:removed)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596343230908) (:text |removed-names)
|D $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596345170865) (:text |hide-empty-fields)
|D $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244126867)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244129097) (:text |new-files)
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |if)
|j $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |some?)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244178635) (:text |filter-ns)
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |let)
|j $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |target)
|j $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244191062) (:text |get)
|b $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244193097) (:text |latest-files)
|f $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244197845) (:text |filter-ns)
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |if)
|j $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |some?)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |target)
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |assoc)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244212403) (:text |old-files)
|r $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244223852) (:text |filter-ns)
|v $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |target)
|v $ {} (:type :expr) (:by |S1lNv50FW) (:at 1624244160589)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244160589) (:text |dissoc)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244215917) (:text |old-files)
|r $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244218442) (:text |filter-ns)
|v $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624244284175) (:text |latest-files)
|r $ {} (:type :expr) (:by |S1lNv50FW) (:at 1596297794059)
:data $ {}
|T $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1596297798768) (:text |fs/writeFile)
Expand Down Expand Up @@ -30252,7 +30296,7 @@
|r $ {} (:type :expr) (:at 1504777570689)
:data $ {}
|T $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |db)
|j $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |op-data)
|j $ {} (:type :leaf) (:by |S1lNv50FW) (:at 1624242024782) (:text |op-data)
|r $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |sid)
|v $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |op-id)
|x $ {} (:type :leaf) (:by |root) (:at 1504777570689) (:text |op-time)
Expand Down Expand Up @@ -34388,4 +34432,4 @@
:data $ {}
:configs $ {} (:storage-key |calcit.edn) (:extension |.cljs) (:output |src) (:port 6001)
:modules $ [] |a/compact.cirru
:version |0.0.2
:version |0.6.0-a2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calcit/editor",
"version": "0.6.0-a1",
"version": "0.6.0-a2",
"description": "Calcit Editor",
"bin": {
"ct": "dist/server.js"
Expand Down
16 changes: 12 additions & 4 deletions src/app/util/compile.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@

(defn handle-compact-files! [pkg
old-files
new-files
latest-files
added-names
removed-names
changed-names
configs]
(let [compact-data {:package pkg,
configs
filter-ns]
(let [new-files (if (some? filter-ns)
(let [target (get latest-files filter-ns)]
(if (some? target)
(assoc old-files filter-ns target)
(dissoc old-files filter-ns)))
latest-files)
compact-data {:package pkg,
:configs {:init-fn (:init-fn configs),
:reload-fn (:reload-fn configs),
:modules (:modules configs),
Expand Down Expand Up @@ -124,7 +131,8 @@
added-names
removed-names
changed-names
(:configs db))
(:configs db)
filter-ns)
(dispatch! :writer/save-files filter-ns)
(if save-ir?
(js/setTimeout
Expand Down

0 comments on commit d5aa27a

Please sign in to comment.