Fork me on GitHub
#boot
<
2015-12-04
>
martinklepsch10:12:09

@lukemorton: I suggest asking in #C03S1L9DN this isn’t really specific to Boot

lukemorton13:12:07

^^ I want a boot specific solution

lukemorton13:12:14

maybe still better for #C03S1L9DN tho

martinklepsch13:12:59

@lukemorton: then I might not understand the question: you were asking how to run cljs test from within a cljs repl right?

lukemorton13:12:05

so I tried using boot-cljs +test via tenzing and just couldnt get anything working, looks like doo and running on nodejs is still in development/not working

lukemorton13:12:46

so thought to ask if there is an easy way to just run this via a browser repl?

lukemorton13:12:51

without needing any other js runtime

martinklepsch13:12:08

@lukemorton: tenzing ships with an old boot-cljs-test version

martinklepsch13:12:15

try 0.2.0-SNAPSHOT

martinklepsch13:12:22

works for me in a newly generated project

lukemorton13:12:08

that using phantomjs or node?

martinklepsch13:12:25

for just running tests in a repl I’d suggest trying run-tests just as in clojure, not sure if that will just work though

alandipert14:12:17

@gary: sorry but we're full

alandipert14:12:25

re: clojurecup

juhoteperi14:12:34

Hint: I don't think Clojurecup's rules (explicitly) forbid bribing judges 😄

micha15:12:35

@juhoteperi: i have been thinking about the GPG stuff a lot the past week

micha15:12:47

i think i have a good solution

micha15:12:56

well potentially

micha15:12:10

basically this:

micha15:12:44

the configure-repository callback will be called before accessing the repo

micha15:12:57

it can do GPG stuff, or whatever

micha15:12:36

then we're not in the business of configuration, we're in a place where we can program

juhoteperi15:12:30

Yeah looks okay

juhoteperi15:12:24

I wouldn't expose a multimethod directly, maybe instead just provide function to register configure calls and keep them on a atom

micha15:12:41

why is that?

juhoteperi15:12:26

I just think that it's better to expose a function instead of multimethod

juhoteperi15:12:37

It is easier to change the implementation later if it's a function

micha15:12:47

but multimethods are functions

micha15:12:06

oh you mean to define the dispatch

juhoteperi15:12:56

Perhaps multimethod is fine

juhoteperi15:12:41

Or we could hide the multimethod behind a macro, I'm just thinking about the API we want to expose

micha15:12:12

one thing with multimethod dispatch is that you can then use hierarchies if you want

micha15:12:32

we'd want to use a separate hierarchy for that

micha15:12:46

probably useless lol

juhoteperi15:12:06

Could be useful for setting configuration that should be used for deploy and download

juhoteperi15:12:13

But I'm not sure if that would be the best solution for that

juhoteperi16:12:07

(configure-repository
  {:url #""
   :ops #{:deploy :resolve-dependencies}
   :fn (fn [base] (merge base {:username "bar" :password "foo"}))})

juhoteperi16:12:54

How about something like that?

juhoteperi16:12:17

Will probably make sense to allow regexes for urls

micha16:12:42

the multimethod is so simple

micha16:12:02

are repo url regexes really useful?

juhoteperi16:12:10

I dunno 😄

micha16:12:17

also seems like maybe bad practice?

juhoteperi16:12:29

We should implement the multimethod version and see if works

micha16:12:30

like sending creds to a repo that matches the regex

micha16:12:41

but not the one you expect

adamfrey17:12:49

Using boot-cljs, I’m not able to get the compiled javascript file to go where I want it to using cljs compiler options. Here’s my task

adamfrey17:12:53

(deftask build []
  (comp
    (speak)
    (cljs :compiler-options {:output-to "index.ios.js"
                             :optimizations :advanced})))

adamfrey17:12:36

It ends up in target/main.js

micha17:12:36

@adamfrey: i think you want to make a index.ios.cljs.edn file

adamfrey17:12:56

ok, I thought I only needed those for multiple builds

micha17:12:21

if you don't make one the cljs task makes a default one for you

micha17:12:29

called main.cljs.edn

micha17:12:34

so you end up with main.js

adamfrey17:12:10

that works and creates a file with correct name. But is there a way to have that file end up outside of the target directory the project root?

micha17:12:48

you can make a task that writes files to any place

adamfrey17:12:24

using sift? all right'

micha17:12:34

not using sift

micha17:12:42

you'd want to make your own task

micha17:12:00

none of the built-in boot things know anything about the target dir

micha17:12:07

they only operate on boot-managed temp dirs

micha17:12:40

oh, you want it to be in a subdirectory?

micha17:12:01

you can make your index.ios.cljs.edn file as like src/foop/index.ios.cljs.edn

micha17:12:09

then it will end up in the foop subdir

micha17:12:14

if that's what you want

adamfrey17:12:10

right now the file ends up in ~/project-root/target/index.ios.js but I want it in ~/project-root/index.ios.js

micha17:12:51

you'd need to make a task for that

micha17:12:27

(deftask copy
  [f from PATH str "source"
   t to PATH str "destination"]
  (with-pre-wrap [fs]
    (io/copy (tmp-file (first (by-path [from] (output-files fs)))) (io/file to))
    fs))

micha17:12:35

somethings like that

adamfrey18:12:18

@micha Thanks! Unfortunately for me I didn’t look back at your code to see you edited and added the first call. But I poked around in the repl and figured out what was wrong. It was a boot learning experience for me, so I’m better off anyway

micha18:12:35

great! 👍

danielsz23:12:54

@micha: @alandipert Good luck with the ClojureCup!

danielsz23:12:39

@martinklepsch: Oh, you're participating too. Good luck!

martinklepsch23:12:11

Yes! How about you @danielsz?

danielsz23:12:07

That sounds great. I'm good, thanks!

danielsz23:12:57

I won't have time for the Clojure Cup this year. I'm launching my service (the Clojure rewrite)

danielsz23:12:15

Very busy with that (but in a fun way)