Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Auto require namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpither committed Mar 13, 2017
1 parent 0f4e6b7 commit b15b60d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mach/core.cljs
Expand Up @@ -239,6 +239,13 @@
(lumo.repl/execute "text" (str x) true false nil)
nil)

;; Auto require
(and (list? x) (symbol? (first x)) (namespace (first x)))
(do
(cljs/eval repl/st `(require '~(symbol (namespace (first x)))) identity)
nil)


:else x))
code)

Expand Down

0 comments on commit b15b60d

Please sign in to comment.