Fork me on GitHub
#lein-figwheel
<
2016-01-07
>
mudphone03:01:32

@mitchelkuijpers: ah, so how do you use that fn?

mudphone03:01:53

I’m using Om Next and have settled on using the figwheel on-jsload callback

mudphone03:01:22

It just calls a fn that wraps this (.upgradeDom js/componentHandler)

mudphone03:01:38

But, I am totally naive here, just getting started.

mitchelkuijpers09:01:42

@mudphone: like this:

(defn dropdown-body [positioning for & children]
  (into [:ul.mdl-menu.mdl-js-menu.mdl-js-ripple-effect {:for for :class (str "mdl-menu--" positioning)}]
        children))

(def dropdown (upgrade-element dropdown-body))

fappy23:01:16

Hello simple_smile I'm trying out https://github.com/bhauman/lein-figwheel#scripting-with-component and rlwrap lein run -m clojure.main --init script/figwheel.clj -r says it cannot find my_proj/something__init.class or my_proj/something.clj on the classpath ... but what I really have is something.cljs which defines a component in my system. What am I missing?

bhauman23:01:34

seems like a configuration problem

bhauman23:01:19

@fappy: does you project work with straight figwheel?

fappy23:01:43

Yes, before I tried to set up component reloading

fappy23:01:22

It was reloading files. But now I'd like it to close a unix socket server nicely on reload. Or something like

bhauman23:01:39

@fappy: read your question again something.cljs shouldn't define a component in your system

bhauman23:01:51

The components in the doc you refered to are all in Clojure land and intended to setup Clojure server side services.

bhauman23:01:35

if you require something.cljs from clojure land that will definitely throw the error you are getting.

fappy23:01:55

Oh. Stuart Sierra's component cannot be used to reload server-side stuff that is cljs for node js ?

fappy23:01:49

Hm. I have servers where JVM is disallowed 😛

bhauman23:01:57

It can for your own node server stuff, but not figwheel server side stuff

bhauman23:01:37

not sure what you are trying to do. but you can start and stop node, from a JVM based Component

fappy23:01:55

My app is intended to be a purely server side app. It communicates with other server side things via unix sockets

fappy23:01:28

When I edit source files, I'd like my app to terminate nicely and come back up again

bhauman23:01:22

you can use figwheel with node and have the code reloaded dynamically so there is no need to restart it??

bhauman23:01:02

still in the dark though. Unfortunately I've gotta go eat. simple_smile

fappy23:01:01

ok thanks!