This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-15
Channels
- # announcements (2)
- # babashka (41)
- # beginners (10)
- # calva (62)
- # chlorine-clover (70)
- # cider (19)
- # clara (2)
- # clj-http (1)
- # clj-kondo (1)
- # cljs-dev (3)
- # cljsrn (8)
- # clojure (168)
- # clojure-austin (1)
- # clojure-australia (2)
- # clojure-canada (1)
- # clojure-europe (15)
- # clojure-france (9)
- # clojure-nl (3)
- # clojure-serbia (5)
- # clojure-spec (14)
- # clojure-uk (8)
- # clojurescript (14)
- # community-development (30)
- # core-async (42)
- # core-typed (1)
- # datahike (2)
- # datalog (23)
- # datomic (4)
- # emacs (4)
- # figwheel-main (4)
- # fulcro (60)
- # ghostwheel (4)
- # girouette (1)
- # gorilla (7)
- # graalvm (11)
- # heroku (8)
- # integrant (42)
- # jobs (6)
- # jobs-discuss (47)
- # kaocha (7)
- # lambdaisland (2)
- # leiningen (5)
- # lsp (29)
- # off-topic (1)
- # pathom (9)
- # portal (6)
- # re-frame (5)
- # reagent (11)
- # releases (6)
- # remote-jobs (10)
- # shadow-cljs (112)
- # testing (55)
- # vrac (1)
Hey everyone, setup question: I'm working with some non-sighted programmers who run emacs on a text-only machine, no desktop environment. Using shadow-cljs (via cider-jack-in) to build a reagent app, and hosting it on a local wordpress docker. We can visit the wordpress from another machine in a standard browser, and the shadow-cljs frontend is there. What doesn't work is interactive repl commands - entering (println "hello world") to the cider-repl in emacs will throw "no available JS runtime." I'm looking through lein, shadow and CIDER docs. Seems like there should be a one-liner to connect a remote repl this way, but it's evaded me so far. If anyone could give me an obvious hint, I'd really appreciate. Thanks!
How is the local wordpress docker instance loading the app from the shadow-cljs dev server?
"no available JS runtime."
usually means the app isn't loaded in any browser window
after starting cider-jack-in to "watch" the build, then I mount the whole project into the docker as a wordpress plugin, and enqueue it from the plugin.php:
function plugin_init() {
wp_enqueue_script(
'cljs-frotend-script',
plugins_url( 'build/frontend.js', __FILE__ ),
array(), '', true
);
}
add_action( 'wp_enqueue_scripts', 'plugin_init' );
sorry to topically hijack… but… you can build WordPress front-ends with shadow-cljs?
#mind-blown
Of course, when I think about it, of course you can. But wow… so cool.
yeah, I'm trying to figure out how to write blocks in the wordpress gutenberg backend, too. it mostly works, a few bugs
@U1G869VNV was right, we miscommunicated & didn't have the page loaded in a browser at the time. everything works normally