(let [src "(require '[reagent.core :as r]) (r/render (fn [] [:h1 \"Hello\"]) (js/document.getElementById \"app\"))"] (cljs/eval-str cljs-state src "kernel.cljs" {:eval (fn [m] (cljs/js-eval m)) :verbose true :load load-fn } (fn [result] (prn result)) ) )
The load-fn I implemented does not know where to find reagent's cljsjs dependencies. It does not know the path to create-react-class.js and react-dom.js that information is provided in the cljsjs package itself {:foreign-libs [{:file "cljsjs/create-react-class/development/create-react-class.inc.js", :provides ["cljsjs.create-react-class" "create-react-class"], :requires ["react"], :file-min "cljsjs/create-react-class/production/create-react-class.min.inc.js", :global-exports {create-react-class createReactClass}}], :externs ["cljsjs/create-react-class/common/create-react-class.ext.js"]} I can see it on the filesystem sto@obi:~/workspace/stigmergy-webtop$ find . -name *react* ./resources/public/js/generated/dev/cljsjs/create-react-class ./resources/public/js/generated/dev/cljsjs/create-react-class/development/create-react-class.inc.js ./resources/public/js/generated/dev/cljsjs/react ./resources/public/js/generated/dev/cljsjs/react/development/react.inc.js ./resources/public/js/generated/dev/cljsjs/react-dom ./resources/public/js/generated/dev/cljsjs/react-dom/development/react-dom.inc.js The question is how do I extract the foreign-libs meta data of where the dependency is in my load-fn? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.