Fork me on GitHub
#figwheel-main
<
2020-05-28
>
dominicm06:05:20

That's fantastic, great work

bhauman17:05:16

added some more :bundle support features this morning

🎉 4
bhauman17:05:17

:bundle-cmd command templates will now have :final-output-dir and :final-output-filename in addition to :output-to and :final-output-to

bhauman17:05:54

which allows us to use the webpack and parcel cli’s better

bhauman17:05:43

AND I added better logging when a bundle command fails so that you can see the output of the failed command

bhauman17:05:44

AND finally I added an :auto-bundle figwheel option which can take either a :webpack or :parcel keyword

bhauman17:05:20

the :auto-bundle option will set all the default config for you

bhauman17:05:08

^{:auto-bundle :webpack} {:main example.core} is a complete config for working with NPM

raspasov17:05:09

@bhauman I realize it’s probably not a priority, but out of curiosity: do you expect yarn to work as more or less drop in replacement of npm? I prefer yarn but I’m probably in the minority

bhauman17:05:22

oh absolutely

bhauman18:05:20

neither figwheel or cljs depend on what you use to populate node_modules

bhauman18:05:44

I should clarify that in the docs I guess

raspasov18:05:14

cool 🙂 yea I thought it would probably work;

bhauman18:05:15

to bad NPM is kinda overloaded

raspasov18:05:37

back in the day, npm was a huge mess and it was causing all sorts of weird issues and non-repeatable builds… yarn was a life-saver back then… I believe they’ve fixed it now (but I’m sticking with yarn)

👍 4
ingesol18:05:27

@bhauman Loving the latest features! I upgraded our ten thousands of lines cljs project to 0.2.6, build and auto testing works great.

🎉 12
bhauman20:05:14

released figwheel-main 0.2.7-SNAPSHOT with latest improvements

🔥 20
parrot 8
👍 8
just.sultanov20:05:33

Awesome 🔥 Thank you. I’m trying to configure the project using parcel with the next config, but I got some spec errors Unknown map key: :final-output-filename` and :final-output-dir` Did I set up something wrong?

^{:open-url              false
  :watch-dirs            ["src"]
  :final-output-dir      "public/assets"
  :final-output-to       "public/assets/app.js"
  :final-output-filename "public/assets/bundle.js"}

{:main            example.core
 :target          :bundle

 :output-dir      "target/public/assets"
 :output-to       "target/public/assets/app.js"

 :bundle-cmd      {:none    ["npx" "parcel" "build" :output-to
                             "--out-dir" :final-output-dir
                             "--out-file" :final-output-filename
                             "--no-minify"]
                   :default ["npx" "parcel" "build" :output-to
                             "--out-dir" :final-output-dir
                             "--out-file" :final-output-filename]}

 :closure-defines {cljs.core/*global* "window"}}

bhauman20:05:34

:final-output-filename isn’t a figwheel-compile option

bhauman20:05:52

just supply :final-output-to and figwheel spits it into :final-output-dir and :final-output-filename for you

bhauman20:05:56

in your example you want :final-output-to to be "public/assets/bundle.js"

bhauman20:05:25

this is bleeding edge so the docs aren’t quite there yet

just.sultanov22:05:43

Oh, thank you. I seem to have figured out the options. But I still could not configure parcel with tailwindcss and monaco-editor. Example with momentjs is very simple. I'll try again tomorrow

just.sultanov22:05:48

Or do I need to build assets separately from clojurescript application to e.g. vendor.js

just.sultanov22:05:35

If I can to configure everything, I will publish a step-by-step guide 😃

bhauman00:05:07

@U1EQNSHL4 I wouldn’t publish anything yet, let me go through some more iterations, because things are going to change probably as I learn more.

bhauman00:05:16

or at least get easier

bhauman00:05:37

@U1EQNSHL4 I’d really like to understand what your hang ups are. Oh I think I understand, yeah you would probably need to run a tailwind watcher separately.

bhauman00:05:56

or you may want to use webpack and postcss-loader?

bhauman00:05:44

actually I think what you are going to want is some post build hooks https://figwheel.org/config-options#post-build-hooks

just.sultanov07:05:20

@bhauman I’m just trying to configure my library and usage example with parcel + figwheel-main instead of shadow-cls + rollup https://github.com/just-sultanov/clj-monaco Anyway thank you for your work on figwheel 👍