boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
seancorfield 2018-09-04T01:52:14.000100Z

@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...

2018-09-04T01:53:18.000100Z

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

seancorfield 2018-09-04T01:53:46.000100Z

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

seancorfield 2018-09-04T01:54:29.000100Z

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?

2018-09-04T01:58:02.000200Z

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.

2018-09-04T01:58:53.000200Z

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

2018-09-04T01:59:22.000100Z

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

seancorfield 2018-09-04T01:59:40.000100Z

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

2018-09-04T01:59:40.000200Z

but for legacy app, it comes with all the dependencies

2018-09-04T01:59:58.000100Z

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

2018-09-04T02:00:11.000100Z

the other new app uses boot

2018-09-04T02:00:33.000200Z

i know it's a bit complex setup

seancorfield 2018-09-04T02:00:44.000100Z

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

2018-09-04T02:00:56.000200Z

funny, it sounds yes

2018-09-04T02:01:11.000100Z

so two legacies

2018-09-04T02:02:33.000200Z

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

seancorfield 2018-09-04T02:03:11.000100Z

🙂 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

seancorfield 2018-09-04T02:03:35.000100Z

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

2018-09-04T02:03:49.000100Z

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

seancorfield 2018-09-04T02:04:08.000100Z

Ours is 2,000 🙂

2018-09-04T02:04:14.000100Z

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

2018-09-04T02:04:22.000100Z

2k?

2018-09-04T02:04:30.000100Z

that's beastier!

seancorfield 2018-09-04T02:04:44.000100Z

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

2018-09-04T02:04:55.000100Z

is it normal to have a big chunky boot file?

seancorfield 2018-09-04T02:05:19.000100Z

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

seancorfield 2018-09-04T02:06:27.000100Z

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...

2018-09-04T02:07:26.000100Z

i see

seancorfield 2018-09-04T02:07:44.000200Z

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

2018-09-04T02:08:17.000100Z

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

2018-09-04T02:08:30.000100Z

i mean .cljs.edn file

seancorfield 2018-09-04T02:08:53.000100Z

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

2018-09-04T02:09:02.000100Z

unless it's not overwritten by build.boot

2018-09-04T02:09:25.000100Z

by looking at the merge order

seancorfield 2018-09-04T02:09:45.000100Z

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

2018-09-04T02:09:46.000100Z

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

2018-09-04T02:10:11.000200Z

thank you for your help

2018-09-04T02:10:20.000100Z

i'll just do some experiment

seancorfield 2018-09-04T02:12:25.000100Z

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!

dave 2018-09-04T02:50:22.000100Z

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

dave 2018-09-04T02:50:30.000100Z

but to each his own 🙂

dave 2018-09-04T02:51:07.000100Z

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

seancorfield 2018-09-04T03:34:37.000100Z

@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...