Skip to content

Commit

Permalink
Cleanup remaining clj(s) resources
Browse files Browse the repository at this point in the history
* Move template files into a more organized resources templates dir
  except for zotero-items.edn which isn't a template
* Remove unused favorites templates
* Move grammar file which should be in a resource path and not a
  standard source path
  • Loading branch information
logseq-cldwalker authored and tiensonqin committed May 30, 2023
1 parent 4c0583c commit 5f44d9b
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:paths ["src/main" "src/electron" "templates" "src/resources"]
{:paths ["src/main" "src/electron" "src/resources"]
:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
rum/rum {:mvn/version "0.12.9"}
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/config.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
(def custom-css-file "custom.css")
(def export-css-file "export.css")
(def custom-js-file "custom.js")
(def config-default-content (rc/inline "config.edn"))
(def config-default-content (rc/inline "templates/config.edn"))
(def config-default-content-md5 (let [md5 (new crypt/Md5)]
(.update md5 (crypt/stringToUtf8ByteArray config-default-content))
(crypt/byteArrayToHex (.digest md5))))
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/handler/global_config.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
(state/set-global-config! config)
config))

(def default-content (rc/inline "global-config.edn"))
(def default-content (rc/inline "templates/global-config.edn"))

(defn- create-global-config-file-if-not-exists
[repo-url]
Expand Down
4 changes: 2 additions & 2 deletions src/main/frontend/handler/repo.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
(let [format (state/get-preferred-format)
file-rpath (str "pages/" "contents." (config/get-file-extension format))
default-content (case (name format)
"org" (rc/inline "contents.org")
"markdown" (rc/inline "contents.md")
"org" (rc/inline "templates/contents.org")
"markdown" (rc/inline "templates/contents.md")
"")]
(p/let [_ (fs/mkdir-if-not-exists (path/path-join repo-dir pages-dir))
file-exists? (fs/create-if-not-exists repo-url repo-dir file-rpath default-content)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion templates/favorites.md

This file was deleted.

1 change: 0 additions & 1 deletion templates/favorites.org

This file was deleted.

2 changes: 1 addition & 1 deletion typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fo = "fo"
aks = "aks"
Mannor = "Mannor"
[files]
extend-exclude = ["resources/*", "templates/*", "src/resources/*"]
extend-exclude = ["resources/*", "src/resources/*"]

0 comments on commit 5f44d9b

Please sign in to comment.