Add docs and workflow for dep

Also rename dep to publishing for consistency with existing names
This commit is contained in:
Gabriel Horner
2023-04-04 18:12:10 -04:00
committed by Tienson Qin
parent 5186070248
commit fef07fe812
28 changed files with 260 additions and 45 deletions

View File

@@ -3,5 +3,5 @@
{logseq/graph-parser
;; Nbb bug. Should just be "../graph-parser"
{:local/root "../../../../deps/graph-parser"}
logseq/publish-spa
{:local/root "../../../../deps/publish-spa"}}}
logseq/publishing
{:local/root "../../../../deps/publishing"}}}

View File

@@ -1,6 +1,7 @@
(ns logseq.tasks.dev.publishing
"Basic script for publishing from CLI"
(:require [logseq.graph-parser.cli :as gp-cli]
[logseq.publish-spa :as publish-spa]
[logseq.publishing :as publishing]
["fs" :as fs]
["path" :as node-path]
[clojure.edn :as edn]))
@@ -18,8 +19,8 @@
;; Offset relative paths since they are run in a different directory than user is in
(map #(if (node-path/isAbsolute %) % (node-path/resolve ".." %)) args)
repo-config (-> (node-path/join graph-dir "logseq" "config.edn") fs/readFileSync str edn/read-string)]
(publish-spa/export (get-db graph-dir)
static-dir
graph-dir
output-path
{:repo-config repo-config})))
(publishing/export (get-db graph-dir)
static-dir
graph-dir
output-path
{:repo-config repo-config})))