This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-26
Channels
- # announcements (5)
- # architecture (1)
- # bangalore-clj (4)
- # beginners (45)
- # boot (4)
- # cider (19)
- # clojure (56)
- # clojure-austin (1)
- # clojure-canada (1)
- # clojure-finland (1)
- # clojure-russia (67)
- # clojure-uk (2)
- # clojurescript (57)
- # clojutre (1)
- # cursive (15)
- # datomic (3)
- # emacs (2)
- # figwheel-main (71)
- # fulcro (117)
- # hoplon (33)
- # java (5)
- # off-topic (52)
- # pedestal (7)
- # remote-jobs (1)
- # shadow-cljs (134)
- # slack-help (9)
- # specter (1)
- # tools-deps (17)
- # vim (2)
@ghiden the built-in http servers can proxy themselves. would that work? https://shadow-cljs.github.io/docs/UsersGuide.html#_proxy_support
you can always use clojure https://shadow-cljs.github.io/docs/UsersGuide.html#clj-run
Thank you for your advice. So basically I have to start a proxy server from one terminal and start a watcher with proxy settings from a different terminal?
so say you start the built-in server via :devtools {:http-port 8080 :http-root "public" :proxy-url "
every request you make to
that does not exist on the file system will be requested from the configured proxy
:devtools-url
is the other proxy-related one but for the other direction. ie. a proxy in front of the shadow-cljs dev server
but its not very configurable and just proxies everything that doesn't have a local file
I'm trying out the fulcro shadow-cljs template. The build launches fine in the terminal (as per README), but I'm wondering if I someone might know why I get this error when trying to launch in CIDER: Exception in thread "main" java.lang.RuntimeException: No such var: ana/cacheable-files, compiling:(shadow/build/cljs_closure.clj:569:19)
Maybe cider can't handle launching the more complicated shadow-via-lein setup in this template.
Ok, after updating piggieback I get the following error after cider-jack-in-clojurescript using lein profile then choosing shadow as the cljs connection type.
Ok, I'm getting closer? I had outdated dependencies (fulcro, shadow-cljs, etc) so now I get this error during compilation:
The above was generated by doing cider-jack-in-clojurescript, but choosing the shadow profile instead.
https://shadow-cljs.github.io/docs/UsersGuide.html#embedded you need to call the server/start!
fn mentioned there.
I use quotes here because lein deps :tree revealed that clojurescript was not a dependency anywhere.
weirdly this only occurred using cider-jack-in-clojurescript. shadow-cljs watch main did not show this compiler error.
no idea about the cider part but it may be starting through lein and not the shadow-cljs command
then lein is responsible for all the classpath stuff and you are on your own sorting out classpath issues
but core.async and lots of other things are important too so make sure youhave the latest verisons of those too
I've installed an npm package from git but shadow-cljs gives The required JS dependency "<name>" is not available, it was required by "<namespace>".
@urbanslug is the npm package in node_modules
? shadow-cljs as far as I know, doesn't do anything when it comes to installing npm pacakges from npm/git/wherever
this works on npm install https://github.com/palerdot/react-d3-speedometer/blob/master/package.json#L76
if you're inside the root of this package, and you do npm install, then "main" doesn't matter. But if you for example require directory locally, it will look at "main" to know which js if the main. If none is found, it defaults to index.js
the directory somehow just didn't get "cloned into node modules. What's weird is that I started a new (js not cljs) project and npm installed it and it was then in my node modules.
ok look here https://github.com/urbanslug/react-d3-speedometer/blob/master/.scripts/prepublish.sh
this repository is only the source code not the distribution. You could run this file, commit it, and then require the git. The developer of this lib probably runs this every time before npm publish
@hlolli btw I deleted my lock files and when I yarn installed then it installed the git repo
@thheller was there a way to have the test runner say how many tests it ran? I'm running node-test, and I only see if I get failures.
@hlolli it should print the summary?
Ran 2 tests containing 6 assertions.
0 failures, 0 errors.
I have target :node-test, and start the test just with shadow-cljs compile buildID
, I just get a Build completed
in the end.
because compile
only compiles the test and does not run them? unless you set :autorun true
I use release
and on completion launch node out-dir/tests.js
in CI so that I can get the right exit code
thanks @U0C8489U6 the problem was mainly that run-tests wasn't called. But I just used use-fixtures, like I've always done, those (few) times I take the time to write tests.
or just "script" "npx shadow-cljs release x && node out/test.js", that should do the trick..
Yep exactly the above @hlolli
@U0C8489U6 a newb question, can you run shadow-cljs on circleci?
Uhm, at the moment I am not on Circle CI, can't you?
I'm looking at docker images, there's one for shadow-cljs, but I'm not sure if you must run their official docker images, or I can choose from docker-hub one.
Yes you can pull anything, you basically just need an image with jdk8 and then your package.json pulls in the rest
Is it also normal for the output of the publishing to be gitignored? https://github.com/palerdot/react-d3-speedometer/blob/master/.gitignore#L4
@urbanslug yes normal. you never put compiled code into git
@urbanslug what are you trying to do exactly? I can't really identify what problem you are actually trying to solve
then you'll need to switch to the directory manually and run the ./scripts/prepublish.sh
well you'll probably also need to manually install all the tools required to run the prepublish.sh
script
you can try, as well you could try useing "scripts" {"install" and run it there. Maybe it can work.