forked from babashka/nbb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
18 lines (18 loc) · 1.05 KB
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{:tasks
{#_#_shadow-server (shell "npx shadow-cljs server")
#_#_shadow-compile (shell "npx shadow-cljs compile :app")
#_#_shadow-node-repl (shell "npx shadow-cljs node-repl")
compile (do (shell "npx shadow-cljs --force-spawn compile modules")
(spit "out/nodashka_core.js"
(clojure.string/replace (slurp "out/nodashka_core.js") (re-pattern "self") "globalThis"))
(spit "out/nodashka_main.js"
(str "#!/usr/bin/env node\n\n" (slurp "out/nodashka_main.js")))
(shell "chmod +x out/nodashka_main.js"))
release (do (shell "npx shadow-cljs --force-spawn release modules")
(spit "out/nodashka_core.js"
(clojure.string/replace (slurp "out/nodashka_core.js") (re-pattern "self") "globalThis"))
(spit "out/nodashka_main.js"
(str "#!/usr/bin/env node\n\n" (slurp "out/nodashka_main.js")))
(shell "chmod +x out/nodashka_main.js"))
run (shell "out/nodashka_main.js test.cljs")
#_#_publish (shell "npm publish")}}