Closed Janiczek closed 10 years ago
Nice one. I'll have a review of this in the next few days! Sounds like I need to get on a new release soon.
Making notes as I test:
karma-chrome-launcher
I tested this against a game I'm mucking with too, and it all looks good. I've put it a feature branch for now: feature/cljx
Things I want to do before I merge into develop (this is just a series of todos for myself):
lein cljx auto
before running the repluser
namespace in the REPL working againBut awesome stuff. Nice work mate!
Glad I could help a bit :)
I looked into the user
namespace thing again, and it seems to work with:
:source-paths ["dev"
"target/generated/src/clj"]
:repl-options {:init-ns user}
It seems the trouble was caused by my ~/.lein/profiles.clj
- I had vinyasa inject refresh
into clojure.core
and it seemed to clash with your refresh
for the system. When I comment out the offending part in ~/.lein/profiles.clj
, I get a working REPL with your helpers in it (go
etc.).
I'll commit that so you can use it.
Had to make some changes, because of the chicken and egg scenario with a "dev/user.clj". Works now, but I need to make note in the README.md that if you don't run some version of lein cljx
before firing up a REPL, it just falls over.
Thanks! This has been merged into develop. I'll do a release once I've written up an announcement for the new features. Nice work.
About the lein cljx
and REPL: I think the
:hooks [cljx.hooks]
thing in project.clj
makes cljx run before lein repl
, actually. But it will be good to have a warning in the README, for sure :)
About the merge: Glad to help! :)
Yeah, it's the nature of the user namespace - it gets loaded before the cljx hooks have the ability to fire. It's very chicken and egg.
With this commit, Brute
0.2.1-SNAPSHOT
nowcljx
purnam.test
as a CLJS replacement formidje
, along withkarma
(see here)lein cleantest
cljx
toclj
andcljs
midje
cljs
karma
I've had to disable your
dev
profile REPL customization - it was consistently crashing my attempts to make cljx work. Maybe some fiddling with the vector of paths will make it work again. I didn't know what's your workflow with that, so I didn't test it.Other thing is that
purnam.test
is really trimmed compared tomidje
. Things like(just #{...})
ornamespace-state-changes
just aren't there, which required me to hack around a few places. But I guess it's still better to have this until some better midje port comes than having, say,clojurescript.test
and not being possible to have a shared test codebase.I didn't test the doc generation, but given what is in
project.clj
, it should see theclj
sources intarget/generated/src/clj
and tests intarget/generated/test/clj
.karma
requires you (or at least required me) to install NPM moduleskarma
karma-cli
karma-jasmine
jasmine-node
Also,
karma
doesn't likeadvanced
compilation (probably would need externs file or something so that it doesn't shorten thejasmine
variable added tojs/window
) so we run inwhitespace
mode. (It is possible to compile Brute without tests in advanced mode, just right now inproject.clj
there's only dev profile with:optimizations :none
, because runninglein cljsbuild test karma
runs all the builds, which would mean that the advanced compilation would prolong the execution time of the already slowcleantest
command by at least 20 seconds. If it's possible to tell cljsbuild to only build one of them -- thetest
one would be enough -- that would fasten it quite a bit.)