Morn'
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
@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”)
morning
@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"}
And then figwheel only added in the dev profile
@benedek: how do you ensure your server serves the asset for dev build for dev profile and prod for prod?
i.e. doesn't your server need to point to /compiled/out
for only prod builds?
Asset path is different for the two diff cljs build env
Or I am not sure what u mean
I saw that. Does the page from the server just load "resources/public/js/app.js" and that picks up appropriate assets?
Yup I guess
😁
Did I say that out loud?
I have <script src="/js/app.js"></script>
in my index.html so I guess again it should
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
)?
BTW more importantly...what is up with Twitter?
I'm desperately trying to push my opinion down the throats of my followers and the systems overloaded.
I use repl in cider and then start figwheel from there
Really awesome dev experience actually
Yep that's what I'm doing
Yes so the former
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.
you should try the js world :simple_smile:
I like devcards
started using it here, but haven't touched it in many weeks: https://github.com/decomplect/ive
dragon fractals, for example: https://github.com/decomplect/ive/blob/master/src/ive/ergo/lindenmayer.cljs