Skip to content

Commit

Permalink
Export custom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
candideu authored and logseq-cldwalker committed May 22, 2023
1 parent c8312bc commit a2cf976
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deps/publishing/src/logseq/publishing/export.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
:as options}]
(let [custom-css-path (node-path/join repo-path "logseq" "custom.css")
export-css-path (node-path/join repo-path "logseq" "export.css")
custom-js-path (node-path/join repo-path "logseq" "custom.js")
output-static-dir (node-path/join output-dir "static")
index-html-path (node-path/join output-dir "index.html")]
(-> (p/let [_ (fs/mkdirSync output-static-dir #js {:recursive true})
Expand All @@ -87,6 +88,8 @@
_ (fs/writeFileSync (node-path/join output-static-dir "css" "export.css") export-css)
custom-css (if (fs/existsSync custom-css-path) (str (fs/readFileSync custom-css-path)) "")
_ (fs/writeFileSync (node-path/join output-static-dir "css" "custom.css") custom-css)
custom-js (if (fs/existsSync custom-js-path) (str (fs/readFileSync custom-js-path)) "")
_ (fs/writeFileSync (node-path/join output-static-dir "js" "custom.js") custom-js)
_ (cleanup-js-dir output-static-dir)]
(notification-fn {:type "success"
:payload (str "Export public pages and publish assets to " output-dir " successfully 🎉")}))
Expand Down

0 comments on commit a2cf976

Please sign in to comment.