This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-28
Channels
- # admin-announcements (2)
- # alda (5)
- # arachne (4)
- # beginners (49)
- # boot (92)
- # capetown (3)
- # cider (9)
- # cljs-dev (6)
- # cljs-edn (1)
- # cljsjs (29)
- # cljsrn (4)
- # clojure (65)
- # clojure-android (1)
- # clojure-berlin (2)
- # clojure-chicago (2)
- # clojure-gamedev (2)
- # clojure-greece (11)
- # clojure-india (1)
- # clojure-japan (1)
- # clojure-new-zealand (2)
- # clojure-quebec (2)
- # clojure-russia (49)
- # clojure-spec (73)
- # clojure-uk (38)
- # clojurescript (118)
- # clojutre (4)
- # community-development (17)
- # cursive (3)
- # data-science (1)
- # datascript (1)
- # datomic (17)
- # emacs (6)
- # euroclojure (2)
- # events (2)
- # immutant (30)
- # keechma (11)
- # leiningen (4)
- # luminus (2)
- # off-topic (19)
- # om (14)
- # onyx (28)
- # planck (9)
- # re-frame (11)
- # reagent (35)
- # ring-swagger (4)
- # schema (4)
- # slack-help (6)
- # spacemacs (2)
- # specter (11)
- # testing (4)
- # untangled (88)
- # utah-clojurians (2)
- # vim (2)
- # yada (9)
I want to combine my boot cljs compile/reload hosting and compojure server in one boot task. Is this a good idea, and how do I go about it?
@petrus: you can use the serve task with your compojure handler if you have one globally defined (i.e. you're not using component or similar)
in general it is a good idea of course 🙂
@martinklepsch, do I then pass in my compojure app handler to serve’s :not-found
handler? And is there a template of someone doing this already?
I ended up copypastaing from this repo: https://github.com/Deraen/saapas/
but now I get this warning: ClojureScript could not load :main, did you forget to specify :asset-path?
got it working. didn’t understand the magic behind main.cljs.edn
@petrus: any particular questions? The main idea behind .cljs.edn is that you can have multiple builds with independent tasks modifying those builds (e.g. injecting dev tooling like repl/reload/cljs-devtools)
is there a way to just get boot to install the listed :dependencies but do nothing else? right now i have a deftask that just logs “hey”, which triggers deps… but that feels icky
@lwhorton: just typing boot
on the command line will do that, if your dependencies are in set-env!
@lwhorton: the only time you need a deps
task is when you load dependencies dynamically in your tasks
and in that case there is no way for boot to know what you're going to do dynamically in pods
does anyone have an example of how you might run npm install from boot assuming the host has npm available on the path? i’ve tried the very basic:
(deftask install-deps
"Install node dependencies before attempting to use them."
[]
(c/with-pre-wrap fileset
(conch/with-programs [npm]
(apply npm ["install" "postcss" "postcss-modules"]))
fileset))
with no success… also tried with (util/dosh)
but I think this is more complicated than I hoped.sounds like a place where I would want to use a pod, i think… and not litter the userland with installs — but i dont know if that supports non-jvm environments likenode
assuming I want to run some node script “myscript”, installing said script locally via something like npm install -g myscript
, I can do just fine with conch
i read the stdout of the process, it can read the stdin of my task, everything’s dandy
but trying to move this to where it’s a 1-button solution for someone else to pull in… without having to have postcss-modules installed globally, would be great.
it is- but when I do that it just kinda .. doesnt’ work? it doesn’t give any error message, but running the script right after that does a require(‘postcss’)
dies right during the require
let’s assume it’s someone who wants to use a pre-defined boot task and I dont have control over them.. ideally I would want them to only require the boot task… but it seems like that’s not really an option
so it was super clean, i just added the python packages to the :dependencies of the jython pod
looks like there is some, just not well documentedd - might be able to npm install inside myself?
hi. I need to put clojurescript output to resources/public
folder so that my ring handler could serve these files as static content. This should work in dev environment with (watch)
and (reload)
etc. Can’t really figure out a way to do this. Any ideas?
I'm trying to use sente in a boot application but it fails with an error complaining about a library that uses cljx.
Do I need to do anything special to use a library written in cljx? The cljx code is not in my code.
@currentoor: https://github.com/Deraen/boot-cljx looks like the thing you need
@micha i tried that, but i think it only works for files in your project
i thought that the practice there was to package transpiled artifacts in jars, so the consumer doesn't need cljx
hmm could be, i'm not sure
how do i do that?
@micha yeah there are cljx files in here
~/.m/r/c/t/t/1.1.1 $ jar tf truss-1.1.1.jar
META-INF/MANIFEST.MF
META-INF/maven/com.taoensso/truss/pom.xml
META-INF/leiningen/com.taoensso/truss/project.clj
project.clj
META-INF/leiningen/com.taoensso/truss/README.md
META-INF/leiningen/com.taoensso/truss/LICENSE
META-INF/
META-INF/maven/
META-INF/maven/com.taoensso/
META-INF/maven/com.taoensso/truss/
META-INF/maven/com.taoensso/truss/pom.properties
taoensso/
taoensso/truss/
taoensso/truss/impl.clj
taoensso/truss/impl.cljs
taoensso/truss.clj
taoensso/truss.cljs
taoensso/truss/examples.cljc
taoensso/truss/impl.cljx
taoensso/truss.cljx
oh i see