Skip to content

Commit

Permalink
static-build code
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 22, 2024
1 parent e919db2 commit 18911ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions demo/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@
:config ["test-config.edn"]
:services "task-services.edn"}}

:static-sci {:exec-fn goldly.build/static-build-copy-sci-code



}

;
}}
15 changes: 9 additions & 6 deletions goldly-sci/src/goldly/build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,20 @@
(defn write-files [dir sci-files]
(doall (map #(export-ns dir %) sci-files)))

(defn export-sci-code [exts]
(defn export-sci-code [exts out-dir]
(let [sci-files (->> (get-extensions-for exts :sci-cljs-ns concat [] [])
(into []))
dir "target/webly/public/code"]
(into []))]
(write-service exts :sci-cljs-ns sci-files)
(ensure-directory dir)
(write-files dir sci-files)))
(ensure-directory out-dir)
(write-files out-dir sci-files)))

(defn static-build-copy-sci-code [& _]
(let [exts (extension/discover)]
(export-sci-code exts "target/static/r/code")))

(comment
(def exts (extension/discover))
(export-sci-code exts)
(export-sci-code exts "target/static/r/code")

;
)
Expand Down

0 comments on commit 18911ef

Please sign in to comment.