@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...
it's a legacy project that comes with boot so I guess i have to use it
Then I'd say the webpack
page doesn't apply to your project?
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?
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.
for generating npm, I'm thinking about shadow-cljs and for new app, i thought i could use this webpack method
so when I create a jar, it contains no js dependencies
Do both projects exist and use Boot? Or is that only the "big single page app"?
but for legacy app, it comes with all the dependencies
one doesn't use boot at all, it's just a js project
the other new app uses boot
i know it's a bit complex setup
Ah, so the new app is already "legacy project that comes with boot"?
funny, it sounds yes
so two legacies
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
🙂 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
OK, you're already using an external options file...
yes, this build.boot is a beast, 1000 lines
Ours is 2,000 🙂
i don't want to touch it so maybe having an external file would be easier
2k?
that's beastier!
Our entire dev/test/build/CI process is built on top of Boot so...
is it normal to have a big chunky boot file?
They tend to just sort of grow and grow as your dev/test/build process evolves...
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...
i see
I suspect your questions will be much more around cljs workflows so the #clojurescript channel might be more helpful than the #boot channel...?
yep, but going back to my question, having an external file would still work, right?
i mean .cljs.edn
file
That will depend on how your build.boot
process is set up I expect...
unless it's not overwritten by build.boot
by looking at the merge order
...I haven't done cljs development for years (I got too frustrated with the tooling and how fast everything was changing all the time).
i need to make sure build.boot
is not changing the fields that I set in the external file
thank you for your help
i'll just do some experiment
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!
a 2000-line build.boot? yowza! at some point, i would be very tempted to move parts of that into dedicated namespaces
but to each his own 🙂
we have a 200-line one that i think is about as long as i can handle
@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...