Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Created May 6, 2012 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsbradleyjr/2606633 to your computer and use it in GitHub Desktop.
Save michaelsbradleyjr/2606633 to your computer and use it in GitHub Desktop.
(ns hello
(:require [cljs.nodejs :as nodejs]
[foo :as foo]))
;;(def foo (.-foo (nodejs/require "./foo")))
(defn ^:export greet [n]
;;(str "Hello, " (.title foo n)))
(str "Hello, " (foo/title n)))
;; ------- foo.cljs -------
;; foo.cljs is in the same directory as hello.cljs
(ns foo)
(defn ^:export title [n]
(str "Mr. " n))
@michaelsbradleyjr
Copy link
Author

simply needed to push process.cwd() onto the classpath from the nodejs side of things...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment