This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-05
Channels
- # admin-announcements (4)
- # beginners (47)
- # boot (69)
- # cider (11)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (163)
- # clojure-austin (17)
- # clojure-russia (27)
- # clojure-uk (46)
- # clojurescript (109)
- # core-async (28)
- # cursive (2)
- # data-science (1)
- # datavis (1)
- # datomic (9)
- # dirac (33)
- # funcool (8)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (1)
- # luminus (23)
- # mount (3)
- # nyc (2)
- # off-topic (25)
- # om (3)
- # onyx (4)
- # perun (7)
- # re-frame (10)
- # reagent (2)
- # ring-swagger (4)
- # spacemacs (4)
- # uncomplicate (1)
- # untangled (21)
- # vim (2)
- # yada (2)
cool, thanks - will try later
so...with adzerk-oss/env
...can I have one env/dev
in profile.boot
(with not persisted env vars) and one in build.boot
?
it is weird because I have (env/def SOME_VAR "test)
in my build.boot
but (`System.getenv "SOME_VAR") returns nil
but I see it in (env/env)
...note, I am in the repl
ops...`(System/getProperty "SOME_VAR")` returns "test"...
so system prop are defined first...
mmm...did not expect that đ
the README states: the system property of the same name if it is set, or
, but in my case it is not set so maybe there is some issue there
Should I use boot with Clojure projects (not ClojureScript)?
@petrus: I have the feeling you'll get biased answers here đ
OK. All the docs Iâve seen seem to be cljs specific, so Iâm not sure if itâs suitable
@petrus: I use it for everything nowadays, it definitely works for clj stuff as well
OK. Would be nice if there was a âHow to get started with Boot for Clojureâ or âHow to port Leiningen projects to Bootâ wiki or something somewhere
Getting started on the GitHub repo: https://github.com/boot-clj/boot#getting-started
Can someone share their build.boot file for a fresh Clojure project that does something basic like show a webpage? Things like dev vs production settings - I donât know how much of my cljs stuff will translate to clojure land. Template for code reloading would be useful
I can't find any minimal docs on what to put in build.boot
so I can run my project like I was running it with Leiningen. I have my cljs projects, but they are littered with tasks that run (cljs)
ok, but I need to deftask
something that I can run like boot run
or boot dev
, right?
I tried boot serve
, but that demands cljs things. So I canât run a clj project without including some cljs things?
so if you have an index.html
file in your :resource-paths then you can access it from that server
I have a question on sift
. When using the :include
param what kind of string is the regex testing against? Letâs say I have my src
path is src
and resources path is resources
. In src
there is a file called app/something.cljs
and in resources
there is a file called index.html
. What would the strings look like?
index.html
app/something.cljs
resources/index.html
src/app/something.cljs
/home/user/proj/resources/index.html
/home/user/proj/src/app/something.cljs
Or something totally different?@jupl it always matches against the path
so you regex will match against it and you can differentiate between app
's and resources
's index.html (and :invert true
if you want to exclude one)
Right, but do you have an example of what the path looks like? Is it an absolute path? A kind of relative path?
Here is a way I use sift:
(deftask styles []
"Compile Styles"
(set-env! :source-paths #{"sass"}
:resource-paths #{})
(comp (watch)
(speak)
(sass)
(sift :include #{ #"([^\s]+(\.(?i)(css))$)"})
(target :dir #{"compiled_css"})))
@dimiter Thanks. I will note that I am familiar with the sift
task. However, I was asking what do the paths that are tested against the regexs appear like, specifically the beginning part. In your case you are testing against the end part.
In your case, the paths would be [âindex.htmlâ "app/something.jsâ] if that is what your clojurescript compiles to.