This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-04
Channels
- # announcements (5)
- # beginners (205)
- # calva (1)
- # cider (48)
- # cljs-dev (9)
- # clojure (123)
- # clojure-berlin (1)
- # clojure-europe (2)
- # clojure-italy (5)
- # clojure-nl (6)
- # clojure-russia (7)
- # clojure-serbia (1)
- # clojure-spec (8)
- # clojure-uk (33)
- # clojurescript (134)
- # cursive (5)
- # datomic (31)
- # emacs (5)
- # figwheel-main (61)
- # fulcro (10)
- # hyperfiddle (23)
- # jobs-discuss (24)
- # klipse (1)
- # lein-figwheel (3)
- # midje (5)
- # nyc (1)
- # parinfer (2)
- # pathom (14)
- # pedestal (12)
- # re-frame (46)
- # shadow-cljs (24)
- # spacemacs (1)
- # tools-deps (37)
- # vim (4)
- # yada (22)
@doglooksgood I didn’t try but it is probably :output-dir
for compiler options. I don’t know if you use cljs / lein / boot so you have to check yourself how to set it
https://figwheel.org/config-options#target-dir there is :target-dir
I'm using clojure-cli. I found this :target-dir
, but the :output-dir
and output-to
is composed by this target-dir
and some fixed strings. I want my develop build and production build use the same path so that I can write <script src="js/main.js"></script>
in my html file.
Here is how I use it: https://github.com/kwladyka/form-validator-cljs/tree/doc production output is here: https://github.com/kwladyka/form-validator-cljs/tree/gh-pages
But it looks like with :output-dir and :target-dir you should be able to change the name
I am currently struggling with this problem https://github.com/tpope/vim-fireplace/issues/303 . I have posted this on the vim channel but I thought i might try my luck here aswell.
@dnolen https://github.com/kwladyka/form-validator-cljs/blob/doc/dev.cljs.edn#L2 you can watch whatever dirs you want. Event outside project. But reload can be more tricky. At least it doesn’t work by default for index.html.
hrm yeah, would be useful in a non-React context where you're just building a very simple site
@kwladyka actually, probably not what I want, I only want to reload the window if and only if index.html
actually changed
you could try put index.html into folder containing only this files resources/public/foo/index.html
and set it with :watch-dir
. In index.html load files with ../
but not sure it is what you want
@dnolen if you are doing something simple and static (without cljs compilation) you can try Visual Studio Code + https://marketplace.visualstudio.com/items?itemName=Flixs.vs-code-http-server-and-html-preview - live preview on one file / or directory depend what you choose
Hello folks and happy new year 😄 I am trying to compile a node
project but
[Figwheel] Failed to compile build test in 0.218 seconds.
[Figwheel:WARNING] Compile Exception: contains? not supported on type: java.lang.Boolean
[Figwheel:SEVERE] java.lang.IllegalArgumentException: contains? not supported on type: java.lang.Boolean
[Figwheel:FINEST] Figwheel.core config: {}
what can be the reason?
no idea, try to comment “half a code”, if no bug, uncomment half of this half and you will finally find this line 🙂
yeah that is what I am doing, but it is a brand new project
so it has very few things that can go wrong 😄 maybe
I have this:
^{:watch-dirs ["src" "dev"]
:log-level :all
:log-syntax-error-style :verbose
:auto-testing true
:extra-main-files {:tests {:main promotion.test.runner}}}
{:optimizations :none
:main promotion.test.runner
:output-dir ".cljs"
:output-to ".cljs/test.js"
:source-map true
:source-map-timestamp false
:target :nodejs
:install-deps true
:closure-defines {promotion.test.test-preload.COLORS true}
:preloads [promotion.test.test-preload]}
and:
(ns promotion.test.runner
(:require [cljs-test-display.core :as test-display]
[cljs.test :as test :include-macros true]
;; require all the namespaces that have tests in them
[promotion.test.campaing-test]))
(test/run-tests (test-display/init! "testing-div")
'promotion.test.campaign-test)
I am using clojure 1.10.0
let me try to downgrade
:closure-defines {promotion.test.test-preload.COLORS true}
I am not sure but try :closure-defines {promotion.test.test-preload/COLORS true}
instead
nope but nice catch
it looks like I have to put the deps to clojure in :deps
rather than in my :dev
alias
this things always buffle me, still classpath dependency problems after > 5 years of Clojure lol
well I thought I could figure it out 😉
or if you want to do it manually look here https://github.com/kwladyka/form-validator-cljs/blob/doc/deps.edn
that's similar to what I have now
h well, I saw it working once, now failing again lol
now that it is working, I am going to
...should I see the tests from cljs-test-display
there?
it looks like the html include the bash preamble:
<script type="text/javascript">#!/usr/bin/env node
if(typeof Math.imul == "undefined" || (Math.imul(0xffffffff,5) == 0)) {
Math.imul = function (a, b) {
var ah = (a >>> 16) & 0xffff;
var al = a & 0xffff;
var bh = (b >>> 16) & 0xffff;
var bl = b & 0xffff;
// the shift by 0 fixes the sign on the high part
// the final |0 converts the unsigned value into a signed value
return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0);
}
}
Am I misconfiguring something? Does :extra-main
works with node targets?
oh I had already reported it here - https://github.com/bhauman/figwheel-main/issues/109
@dnolen there is a fairly straightforward pattern where you can add watcher and eval javascript on the client side https://github.com/bhauman/figwheel-main/blob/master/src/figwheel/main/css_reload.cljc
@bhauman the above - is it never going to work or it requires tweaking only?
I though a layer would exec the tests server side (in the node process) and only the results would be sent
kk cool thank you