Fork me on GitHub
#boot
<
2018-09-04
>
seancorfield01:09:14

@ghiden My first thought would be: why do you want to use Boot for that? It looks like using yarn and clj is pretty simple...

ghiden01:09:18

it's a legacy project that comes with boot so I guess i have to use it

seancorfield01:09:46

Then I'd say the webpack page doesn't apply to your project?

seancorfield01:09:29

Perhaps, take a step back -- you have an existing ClojureScript project that uses Boot, yes? What do you want to do with/to that project?

ghiden01:09:02

it's a long process but I have two projects: one in some jquery-ish big single page app and the next one is new app with cljs. Trying to bridge between two, I want to introduce new components in cljs. From this component, I want to produce npm for legacy app and cljs jar for new app.

ghiden01:09:53

for generating npm, I'm thinking about shadow-cljs and for new app, i thought i could use this webpack method

ghiden01:09:22

so when I create a jar, it contains no js dependencies

seancorfield01:09:40

Do both projects exist and use Boot? Or is that only the "big single page app"?

ghiden01:09:40

but for legacy app, it comes with all the dependencies

ghiden01:09:58

one doesn't use boot at all, it's just a js project

ghiden02:09:11

the other new app uses boot

ghiden02:09:33

i know it's a bit complex setup

seancorfield02:09:44

Ah, so the new app is already "legacy project that comes with boot"?

ghiden02:09:56

funny, it sounds yes

ghiden02:09:11

so two legacies

ghiden02:09:33

if i have .cljs.edn file with options listed on the webpack page, would it work? https://github.com/boot-clj/boot-cljs/blob/master/docs/compiler-options.md

seancorfield02:09:11

🙂 I guess "legacy" code is anything someone wrote before today... So your cljs+boot project probably already has a cljs build config (in build.boot or externally) so adding the options from the webpack page should be all you need... I think

seancorfield02:09:35

OK, you're already using an external options file...

ghiden02:09:49

yes, this build.boot is a beast, 1000 lines

seancorfield02:09:08

Ours is 2,000 🙂

ghiden02:09:14

i don't want to touch it so maybe having an external file would be easier

ghiden02:09:30

that's beastier!

seancorfield02:09:44

Our entire dev/test/build/CI process is built on top of Boot so...

ghiden02:09:55

is it normal to have a big chunky boot file?

seancorfield02:09:19

They tend to just sort of grow and grow as your dev/test/build process evolves...

seancorfield02:09:27

Ours has a lot of machinery for automatically deducing cross-project dependencies within our monorepo... plus a lot of build-related tasks that used to be done via ant and bash...

seancorfield02:09:44

I suspect your questions will be much more around cljs workflows so the #clojurescript channel might be more helpful than the #boot channel...?

ghiden02:09:17

yep, but going back to my question, having an external file would still work, right?

ghiden02:09:30

i mean .cljs.edn file

seancorfield02:09:53

That will depend on how your build.boot process is set up I expect...

ghiden02:09:02

unless it's not overwritten by build.boot

ghiden02:09:25

by looking at the merge order

seancorfield02:09:45

...I haven't done cljs development for years (I got too frustrated with the tooling and how fast everything was changing all the time).

ghiden02:09:46

i need to make sure build.boot is not changing the fields that I set in the external file

ghiden02:09:11

thank you for your help

ghiden02:09:20

i'll just do some experiment

seancorfield02:09:25

I think the only relevant part of that webpack page for you, given you have an existing project with Boot, is the compiler options -- but if your Boot process is already set up to produce artifacts, I'm not sure whether you'll run into conflicts in the options. Good luck!

dave02:09:22

a 2000-line build.boot? yowza! at some point, i would be very tempted to move parts of that into dedicated namespaces

dave02:09:30

but to each his own 🙂

dave02:09:07

we have a 200-line one that i think is about as long as i can handle

seancorfield03:09:37

@dave Yeah, we've contemplated refactoring the functions out... especially as we're also looking to see how much we could do with clj... we've had external deps EDN files with Boot for ages, with a fixed set of version overrides...