Created
November 5, 2021 19:34
-
-
Save udkl/858d8afb029c66cbcef1fd9deeb84a58 to your computer and use it in GitHub Desktop.
Shadowcljs hot reload websocket config for gitpod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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