Skip to content

Instantly share code, notes, and snippets.

@udkl
Created November 5, 2021 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udkl/858d8afb029c66cbcef1fd9deeb84a58 to your computer and use it in GitHub Desktop.
Save udkl/858d8afb029c66cbcef1fd9deeb84a58 to your computer and use it in GitHub Desktop.
Shadowcljs hot reload websocket config for gitpod
#! /bin/sh
# This is a very crude way where you change the shadow cljs jar in the maven repo and repackage it
cd '/home/gitpod/.m2/repository/thheller/shadow-cljs/2.15.12'
# unzip to directory called out
unzip shadow-cljs-2.15.12-aot.jar -d out
mv shadow-cljs-2.15.12-aot.jar shadow-cljs-2.15.12-aot-backup.jar
# Manually edit the file (to be automated later)
#/home/gitpod/.m2/repository/thheller/shadow-cljs/2.15.12/out/shadow/cljs/devtools/client/env.cljs
# (defn get-ws-relay-url []
# (str "wss://9630-your-workspace-url.gitpod.io" (get-ws-relay-path)))
# Build the new jar
cd out
zip -r ../shadow-cljs-2.15.12-aot.jar *
cd ..
# Create the SHA1 for the new jar
mv shadow-cljs-2.15.12-aot.jar.sha1 shadow-cljs-2.15.12-aot.jar.sha1_backup
sha1sum shadow-cljs-2.15.12-aot.jar | awk '{print $1}' > shadow-cljs-2.15.12-aot.jar.sha1
# restart `./node_modules/shadow-cljs/cli/runner.js watch app`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment