Fork me on GitHub
#ldnclj
<
2016-01-19
>
agile_geek07:01:47

Much simpler question than @mccraigmccraig's but how are ppl managing cljsbuild in lein so that figwheel is on for dev but not for prod builds? I tried specifying default build options in :cljsbuild at top level and then activating figwheel only in dev profile but this doesn't work because figwheel doesn't honour profile merging. So ended up having to specify :figwheel true at top level which means it's 'on' all the time. See https://github.com/ldnclj/meetdown/blob/reagent-spike-merge/project.clj

jthomson07:01:13

@mccraigmccraig: we solved a similar problem by using one uber-repo and adding the common stuff to sources in each artefact project (e.g. “../model/src”)

benedek09:01:14

@agile_geek I have something like

:cljsbuild

  {:builds

   {:dev

    {:source-paths ["src/cljs"]

     :figwheel true

     :compiler {:output-to "resources/public/js/app.js"

                :output-dir "resources/public/js/out"

                :main "meta-insight.core"

                :asset-path "/js/out"

                :recompile-dependents true}}

    :prod

    {:source-paths ["src/cljs"]

     :compiler {:output-to "resources/public/js/app.js"

                :output-dir "resources/public/js/compiled/out"

                :asset-path "/js/compiled/out"

                :optimizations :simple

                :main "meta-insight.core"}

benedek09:01:51

And then figwheel only added in the dev profile

agile_geek09:01:52

@benedek: how do you ensure your server serves the asset for dev build for dev profile and prod for prod?

agile_geek09:01:37

i.e. doesn't your server need to point to /compiled/out for only prod builds?

benedek09:01:34

Asset path is different for the two diff cljs build env

benedek09:01:49

Or I am not sure what u mean

agile_geek09:01:53

I saw that. Does the page from the server just load "resources/public/js/app.js" and that picks up appropriate assets?

benedek09:01:28

Yup I guess

benedek09:01:35

Did I say that out loud?

benedek09:01:35

I have <script src="/js/app.js"></script> in my index.html so I guess again it should

agile_geek09:01:07

Thx @benedek I'll try that. Do you use the new way of connecting to figwheel via nRepl (i.e. lein repl then (use 'figwheel-sidecar.repl-api) then (start-figwheel!) and (cljs-repl) rather than lein figwheel)?

agile_geek09:01:40

BTW more importantly...what is up with Twitter?

agile_geek09:01:17

I'm desperately trying to push my opinion down the throats of my followers and the systems overloaded.

benedek09:01:22

I use repl in cider and then start figwheel from there

benedek09:01:34

Really awesome dev experience actually

agile_geek09:01:54

Yep that's what I'm doing

benedek10:01:48

Yes so the former

agile_geek16:01:39

Has anyone tried DevCards? I like the look of it but I have spent 30 mins trying to get anything to render within an existing app and can't. I get frustrated with the amount of knowledge required to simply get anything working in the cljs world sometimes.

mamapitufo16:01:22

you should try the js world simple_smile

meow22:01:21

I like devcards

meow22:01:49

started using it here, but haven't touched it in many weeks: https://github.com/decomplect/ive