forked from borkdude/quickblog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbb.edn
More file actions
54 lines (41 loc) · 2.07 KB
/
Copy pathbb.edn
File metadata and controls
54 lines (41 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{:deps {io.github.borkdude/quickblog {:local/root "."}
}
:paths ["."]
:bbin/bin {quickblog {:ns-default quickblog.api}}
:tasks
{:requires ([babashka.fs :as fs])
:init (do
(def opts {:blog-title "REPL adventures"
:blog-description "A blog about blogging quickly"
:about-link "https://github.com/borkdude/quickblog"
:twitter-handle "quickblog"})
(defn- run-command [cmd-name opts]
(apply (requiring-resolve 'quickblog.cli/dispatch) opts cmd-name *command-line-args*)))
quickblog {:doc "Start blogging quickly! Run `bb quickblog help` for details."
:task ((requiring-resolve 'quickblog.cli/dispatch) opts)}
new {:doc "Create new blog article"
:task (run-command "new" opts)}
migrate {:doc "Migrate away from posts.edn to metadata in post files"
:task (run-command "migrate" opts)}
refresh-templates
{:doc "Update to latest templates. NOTE: this is a destructive operation, as it will overwrite any templates you have in your `:templates-dir`. You should ensure that your templates are backed up or under revision control before running this command!"
:task (run-command "refresh-templates" opts)}
render {:doc "Render blog"
:task (run-command "render" opts)}
watch {:doc "Watch posts and templates and render file changes"
:task (run-command "watch" opts)}
clean {:doc "Remove cache and output directories"
:task (run-command "clean" opts)}
publish {:doc "Publish blog"
:depends [render]
:task (shell "rsync -a --delete public/ user@yourdomain:~/blog")}
test {:doc "Run tests"
:task (apply clojure "-M:test" *command-line-args*)}
test:bb {:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:exec-args {:cmd "bb test"}
:task (exec 'quickblog.test-runner/test)}
quickdoc {:doc "Re-generate API.md"
:task (shell "bb --config quickdoc.edn quickdoc")}
}}