Skip to content

Commit 1c62c10

Browse files
author
dnolen
committed
make macro example less trivial, transient ns helper
1 parent e90d7e0 commit 1c62c10

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/main/cljs/cljs/js.cljs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@
761761

762762
(def libs
763763
{'bootstrap-test.core :cljs
764-
'bootstrap-test.macros :clj})
764+
'bootstrap-test.macros :clj
765+
'bootstrap-test.helper :clj})
765766

766767
(defn node-load [{:keys [name macros]} cb]
767768
(if (contains? libs name)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(ns bootstrap-test.helper)
2+
3+
(defn bar [a b]
4+
`(* ~a ~b))
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
(ns bootstrap-test.macros)
1+
(ns bootstrap-test.macros
2+
(:require [bootstrap-test.helper :refer [bar]]))
23

34
(defmacro foo [a b]
4-
`(* ~a ~b))
5+
(bar a b))

0 commit comments

Comments
 (0)