mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
🎉 Add node repl to tools.clj script.
This commit is contained in:
parent
17b91b9368
commit
b8050068d7
1 changed files with 21 additions and 1 deletions
|
@ -1,8 +1,16 @@
|
||||||
(require '[clojure.pprint :refer [pprint]])
|
(require '[clojure.pprint :refer [pprint]])
|
||||||
(require '[clojure.java.shell :as shell])
|
(require '[clojure.java.shell :as shell])
|
||||||
(require '[figwheel.main.api :as figwheel])
|
(require '[figwheel.main.api :as figwheel])
|
||||||
(require '[cljs.build.api :as api])
|
|
||||||
(require '[environ.core :refer [env]])
|
(require '[environ.core :refer [env]])
|
||||||
|
(require '[cljs.build.api :as api]
|
||||||
|
'[cljs.repl :as repl]
|
||||||
|
'[cljs.repl.node :as node])
|
||||||
|
(require '[rebel-readline.core]
|
||||||
|
'[rebel-readline.clojure.main]
|
||||||
|
'[rebel-readline.clojure.line-reader]
|
||||||
|
'[rebel-readline.clojure.service.local]
|
||||||
|
'[rebel-readline.cljs.service.local]
|
||||||
|
'[rebel-readline.cljs.repl])
|
||||||
|
|
||||||
(defmulti task first)
|
(defmulti task first)
|
||||||
|
|
||||||
|
@ -126,6 +134,18 @@
|
||||||
(task ["dbg-dist:main"])
|
(task ["dbg-dist:main"])
|
||||||
(task ["dbg-dist:worker"]))
|
(task ["dbg-dist:worker"]))
|
||||||
|
|
||||||
|
(defmethod task "repl:node"
|
||||||
|
[args]
|
||||||
|
(rebel-readline.core/with-line-reader
|
||||||
|
(rebel-readline.clojure.line-reader/create
|
||||||
|
(rebel-readline.cljs.service.local/create))
|
||||||
|
(cljs.repl/repl
|
||||||
|
(node/repl-env)
|
||||||
|
:prompt (fn []) ;; prompt is handled by line-reader
|
||||||
|
:read (rebel-readline.cljs.repl/create-repl-read)
|
||||||
|
:output-dir "out"
|
||||||
|
:cache-analysis false)))
|
||||||
|
|
||||||
;; --- Tests Tasks
|
;; --- Tests Tasks
|
||||||
|
|
||||||
(defmethod task "build:tests"
|
(defmethod task "build:tests"
|
||||||
|
|
Loading…
Add table
Reference in a new issue