This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-12
Channels
- # beginners (4)
- # boot (58)
- # braid-chat (9)
- # cider (19)
- # clojure (26)
- # clojure-austin (8)
- # clojure-berlin (1)
- # clojure-poland (2)
- # clojure-russia (238)
- # clojurescript (22)
- # core-async (2)
- # cursive (6)
- # datomic (32)
- # emacs (5)
- # hoplon (1)
- # jobs (10)
- # keechma (1)
- # ldnclj (2)
- # off-topic (5)
- # om (7)
- # onyx (4)
- # proton (1)
- # re-frame (10)
- # reagent (5)
- # ring-swagger (10)
@alandipert: im just trying your move-webjars
task but it blows up like this:
clojure.lang.ExceptionInfo: java.io.FileNotFoundException: /Users/onetom/.boot/cache/tmp/Users/onetom/p/neat/12lz/-p9hf6h/META-INF/resources/webjars/bourbon/4.2.6/bower.json (No such file or directory)
the /Users/onetom/.boot/cache/tmp/Users/onetom/p/neat/12lz/-p9hf6h/
temp dir is empty afterwards so im not sure why does it complain.If I print the files of the libs within the bower?
fn with (dorun (map (comp println :path) (flatten (vals libs))))
I do see
META-INF/resources/webjars/bourbon/4.2.6/bower.json
i'm not sure about the gist specifically, but if you see those errors it's usually becuase youre trying to write to a file when some of the directories the file will be in don't exist
i saw martin also posted something along these lines, so i will try that next if this one fails
@micha Can you remind me what is the best practice wrt the org.clojure/clojure
dependency in boot libraries? Omission (like boot-test)? :scope "provided"
like boot-cljs?
ah ok, that's what I have in boot-http. what about a boot.properties
file? i notice most libs don't have one
i had the exact same questions in my mind in the past few weeks, just didnt have the capacity to ask
but if u specify clojure 1.8.0 in the boot.properties
, then boot.core is using clojure 1.8 and my app itself is also using that transitively, no?
but if i only specify 1.8 in set-env :dependencies then i will end up pulling down both versions, no?
@onetom: yeah the boot.properties should have the same clojure version as what you specify in your build.boot :dependencies
i think where it's doing println
is where the logic for moving things would go, perhaps?
@onetom: sorry, I never finished that task
;; META-INF/resources/webjars/basscss/8.0.1/css/basscss.css
(deftask from-jars
[i imports IMPORT #{[sym str str]} "Tuples describing imports: [jar-symbol path-in-jar target-path]"]
(let [add-jar-args (into {} (for [[j p] imports] [j (re-pattern (str "^" p "$"))]))
move-args (into {} (for [[_ p t] imports] [(re-pattern (str "^" p "$")) t]))]
(util/dbug "Importing from jars: %s\n" (pr-str add-jar-args))
(util/dbug "Moving into locations: %s\n" (pr-str move-args))
(util/info "Importing %s files from jars...\n" (count imports))
(sift :add-jar add-jar-args
:move move-args)))
(deftask import-css []
(comp (from-jars :imports #{['org.webjars.npm/basscss "META-INF/resources/webjars/basscss/8.0.1/css/basscss.css" "_bass.scss"]
['org.webjars.npm/normalize.css "META-INF/resources/webjars/normalize.css/3.0.3/normalize.css" "_normalize.scss"]})))
@onetom: maybe this helps if you're trying to pull in webjars
i was working on a task that handled the "bower' webjars too but then i learned some of the web components ones aren't packaged correctly so i gave up
I started working on a Apache-exec task to nicely wrap local bin's, I don't think we can entirely avoid using bower as of yet
@martinklepsch: @alandipert: thanks. just saw your answers though, because i was not paying attention to slack... i've ended up doing the same sifting business, but haven't generalized it yet. I just made PureCSS (more or less) work:
(sift
:add-jar {'org.webjars.bower/purecss #".+\.css$"}
:move {#"/src/.+/(.+)\.css$" "/_$1.scss"})
and having an app.scss
:
@import "normalize-css/normalize";
@import "purecss/base";
@import "purecss/buttons-core";
@import "purecss/buttons";
@import "purecss/forms";
@import "purecss/forms-r";
@import "purecss/grids-core";
@import "purecss/menus-core";
@import "purecss/menus-horizontal";
@import "purecss/menus-dropdown";
@import "purecss/menus-scrollable";
@import "purecss/menus-skin";
@import "purecss/tables";
i wrote this based on their Gruntfile (https://github.com/yahoo/pure/blob/master/Gruntfile.js) BUT the grid setup or something else is still missing, so the characters pile up on each other
@martinklepsch: im using @juhoteperi boot-sass
task (v0.2.1).
are you using the same?
@onetom: Using the same yes, regex to import all files is probably saner than importing single files