clojurescript

Zak Venter 2025-11-26T13:43:06.542069Z

Should I .gitignore the contents of the js folder?

thheller 2025-11-26T13:43:22.706009Z

yes

Zak Venter 2025-11-26T13:43:47.026199Z

Alright thanks! Also funny seeing you here as I used your guide to set up the project lol (thanks for that btw!)

thheller 2025-11-26T13:43:55.872269Z

well, unless you deploy from git and actually need the output in the git tree somehow

Zak Venter 2025-11-26T13:44:17.639949Z

Maybe I will eventually, but for now I'd like this not to seem like a js project on github lol

p-himik 2025-11-26T13:45:06.724789Z

Just in case - after doing that, you'll need to be mindful of anyone and anything casually suggesting to put something in public/js. Like if you wanted to depend on some .js file, for example - that would need to be tracked, so you'd have to put it some place other than public/js.

Zak Venter 2025-11-26T13:45:50.422779Z

Alright thanks for that, I'll keep it in mind

thheller 2025-11-26T13:48:02.803219Z

yeah, best to think of it as a folder that is owned by shadow-cljs. it'll overwrite anything it wants without asking, so just don't put anything not generated in there 😉

thheller 2025-11-26T13:48:35.879329Z

also makes it easy to never worry about rm -rf public/js or so if you want a "clean slate"

Zak Venter 2025-11-26T13:49:43.669779Z

Zak Venter 2025-11-26T13:49:48.409539Z

before and after

Zak Venter 2025-11-26T13:49:54.584519Z

or wait, after and before

thheller 2025-11-26T13:50:16.671189Z

hehe yeah, lots of stuff in generated in dev builds 😛

Zak Venter 2025-11-26T13:50:55.775519Z

I imagine if I run it not as dev, the js files wont be as big?

Zak Venter 2025-11-26T13:51:16.886979Z

20mb currently

Zak Venter 2025-11-26T13:51:31.991679Z

ie build it for prod

Arek 2025-11-26T13:52:05.180499Z

Just in case, it seems it's an output from dev build that doesn't use advanced compilation. It's not really suitable for web deployment and that's why it's so big

Zak Venter 2025-11-26T13:52:35.491009Z

Yep makes sense

p-himik 2025-11-26T14:00:10.907599Z

Also, if you have already committed it but you're the only dev in your project, consider purging it from the repo entirely with --force and a combination of some Git commands. Otherwise, everyone cloning your repo without --depth 1 would have to also fetch all that cruft, even when it doesn't exist in the most recent commit.

👍 1
thheller 2025-11-26T14:08:56.482719Z

yes, release/prod builds will be substantially smaller