This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-28
Channels
- # aleph (3)
- # beginners (10)
- # boot (135)
- # clara (2)
- # cljsjs (2)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (4)
- # clojure-france (2)
- # clojure-japan (1)
- # clojure-spec (30)
- # clojure-uk (11)
- # clojurescript (48)
- # component (65)
- # cursive (5)
- # datomic (40)
- # dirac (5)
- # emacs (3)
- # events (16)
- # funcool (2)
- # klipse (46)
- # lein-figwheel (2)
- # luminus (8)
- # off-topic (4)
- # om (7)
- # other-languages (4)
- # parinfer (21)
- # re-frame (15)
- # reagent (30)
- # ring (1)
- # ring-swagger (9)
- # rum (3)
- # specter (7)
- # test-check (8)
- # testing (5)
- # vim (21)
- # yada (4)
Hey guys, trying to switch from lein to boot, I need to grab some stuff from npm, thinking about using degree9/boot-npm
,
the problem is I need to serve that stuff from ./resources/public
. There's no way of telling npm to use ./resources/public/.node_modules
and I couldn't find a way to serve static resources from outside of public
with ring
. lein-npm
takes :root
key and it works - you can tell to use any dir for node_modules root. What would you recommend me doing? I don't want to run npm and copy stuff every time I build things
to clarify, you want to publicly serve your .node_modules directory? the directory with all your node dependencies in it?
@mikebelanger Does fireplace support cljs completion now?
@doglooksgood If you have browser repl connection, yes.
@lxsameer What do you mean?
@juhoteperi I mean , can i use figwheel when I'm using boot-cljs ?
boot-figwheel is separate from boot cljs stack and replaces boot-cljs & co
Though I don't see why one would need to use Figwheel instead of Boot-cljs. It has a few more features but Boot-cljs is "idiomatic Boot task" while Boot-figwheel is quite hacky
@juhoteperi boot-cljs is just for compiling to js right ? but figwheel has lots of cool features
@lxsameer Boot-cljs stack is nearly identical to Figwheel, pretty much the only feature it is missing is showing error context on the HUD
And configuration validation
@juhoteperi so how to you check for possible errors
Boot-reload HUD will still display the errors and error location
Boot-reload HUD only shows the line and column numbers, Figwheel shows the source code for offending line (https://github.com/bhauman/lein-figwheel/blob/master/CHANGES.md#code-context-in-errors-and-warnings)
@lxsameer example of Figwheel's error msgs
boot-cljs will only show you the error msg and the line, not all that Elm-y stuff
@lxsameer I recommend you try boot-cljs & boot-reload, it will provide similar live reload workflow
You could try some existing example project first, for example https://github.com/Deraen/saapas
They affect e.g. if the dependency is transitive or included in uberjar: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
Test scope is not included in uberjar and is not a transitive dependency
btw @lxsameer, @richiardiandrea is looking into better integration of figwheel within boot (which does not use the target dir)
@upgradingdave Glad it helped! I just happened to have stumbled on that page the other day, and your problem gave me a deja-vu
@doglooksgood Judging from @juhoteperi's answer, I guess so! I just like Adam Bard's blog because he has lots of clearly-written tutorials. I'm not a vim user.
hey, is there a way to run boot tasks in parallel?
like, garden and cljs for example
@thedavidmeister there's some stuff in boot.parallel
that @richiardiandrea has been working on. I think there might also be some docs around it somewhere, not sure where exactly though
great thanks
@micha ah cool, i think
i mean, the readme is just a title 😛
cool, i’ll check it out tomorrow
i’ll ping you if i get confused
wow so many mentions today 😄 About boot-figwheel
: I got the fileset part working, I am having a bit of trouble serving the (updated) files at the moment, it is coming along pretty well
I was using boot-http
for that, but it looks like the served files are always the ones you start the server with, probably figwheel does some magic for making sure it serves always the new version
the nice thing is that I see the updated files in the boot
's tmp folders so that part is working
@richiardiandrea I think the figwheel server attaches the updated CLJS files' MD5 to the filename to guarantee it serves the updated files
not sure though
@anmonteiro that would explain what I am missing, so one solution can be to use figwheel's own server...I just wanted to overcome the limitation of using resources
(for example I have my files in assets
)
thanks for the link, I'll inspect that
I am very close to have it working
and the fact that he is using resources
maybe is linked exactly to this issue, not sure...`boot` has a nice watch task that could achieve the same thing, I'll need to figure this out
is there a list / collection of available boot templates? i.e. based on boot-new
or lein
ones that generate boot projects (i.e. like lambone
/ tenzing
)?
@tolitius I haven't seen any
New username \o/
Hey, I’m starting to create a PR to update pretty to 0.1.30. Is there any magic, or just a matter of copying over sources?
so I was reading that discussion about boot-figwheel vs. cljs-boot/reload etc. I really like figwheel and have enormous respect for @bhauman and although using cljs-boot/serve/watch is pretty straightforward I’d rather keep using figweel. We’re migrating from lein to boot. Would it be wise to keep trying “hacky” way of preserving figwheel or it’s really like “swimming agains the current”?
@ag I am trying to get out of the "hacky" way of doing things, we'll see if it pans out 😄
My build.boot file only creates a project.jar file and never the project-named asset that its supposed to: (task-options! pom {:project 'ff-server :version "1.0.0"} jar {:main 'ff-server.handler} aot {:all true} repl {:init-ns 'ff-server.handler :eval '(set! print-length 20)}) (deftask build [] (comp (build-cljs) (aot) (pom) (uber) (jar)))
@georgek how do you mean project-named asset? also, are you AOT compiling cljs sources?
I mean, in this case, I’m expecting there to be an ff-server.jar file in the target directory and it only ever shows up as project.jar
well, no 😄
but I see the task (aot)
there ah ah
about the file, you need to append the (target)
task
in order to dump to ./target
Writing pom.xml and pom.properties... Adding uberjar entries... Merge conflict: not adding META-INF/LICENSE Writing project.jar... Writing target dir(s)... Implicit target dir is deprecated, please use the target task instead. Set BOOT_EMIT_TARGET=no to disable implicit target dir.
ah, basically it looks like two or more libs are trying to add META-INF/LICENSE
to your artifact...
there should be a way to set a merging strategy somewhere, lemme check
@georgek do you have the requirement to produce a .js
file in a jar I suppose?
I mean only the .js
file nothing else
oh at this point the cljs stuff is incidental. I’m using nginx-clojure so my deployment strategy is not standard. What I’m trying to do is de-compose what’s now a monolithic project into one main lib and several other projects that pull it in via a local maven repo
So, your suggesting that the LICENSE conflict is preventing the creation of that asset?
because probably something like (sift :include #{#"\.js$"})
would just include the .js
file and that's it
after build-cljs
(untested) 😄
I'm trying to learn to use cider to develop an application that uses boot. It appears that if I just open a file in the project and jack in, it does not start the server that I get when I run boot dev
from the command line.
@mathpunk cider
calls boot
using the cider-boot-parameters
variable
lol ok so maybe there something else there
step #2 is what I think you should verify
let me know when it works, I use this wf daily
do boot tasks compose from the left or the right? that is, when I see something like cider repl -s ...others... wait
is repl
last or first?
er, I suppose it's, is cider
last or first, now that i'm looking at how cider is defined in the "A Better Way"
cider
should be first
I've got to learn more about how the runtime works... clojure code often makes sense but "where" it is is confusing as heck
in Task Anatomy you can actually understand what is going on better I think
the handlers are called sequentially starting from the first
ah, nice. I thought I was kiiiiinda getting the fileset abstraction but, i think i'm still shaky on it
the exception to the rule is when a task is launched in a future
but that's not for now 😄
status: staring at https://github.com/mathpunk/anansi/blob/master/build.boot which is cloned and modified from tenzing
and i definitely don't know whether watch
should happen before or after serve
, or doesn't matter. I mean, if they're middleware, many tasks will be commutative right?
so watch
is a middleware, meaning...it returns a handler
a middleware can be commutative or not, but depends on what it is doing I guess
yep, well in case of watch
, the its purpose is to call the handler chain on file system changes
so I usually put it in front of everything
and when it triggers, it calls the handlers after it
hey guys… sorry for a noob question: in lein I had (defproject {:profiles {:dev {:env ,,,,}}})
. How do I set env
values in boot? Trying different things, yet ring handler doesn’t seem to be picking up those.
@ag I personally use https://github.com/adzerk-oss/env for that
very cool way of building docker images