figwheel-main

figwheel-main http://figwheel.org
dominicm 2020-05-28T06:48:20.005200Z

That's fantastic, great work

bhauman 2020-05-28T17:53:16.007700Z

added some more :bundle support features this morning

🎉 1
bhauman 2020-05-28T17:55:17.009600Z

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

bhauman 2020-05-28T17:55:54.010400Z

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

bhauman 2020-05-28T17:56:43.011300Z

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

bhauman 2020-05-28T17:57:44.012800Z

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

bhauman 2020-05-28T17:58:20.014200Z

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

bhauman 2020-05-28T17:59:08.015700Z

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

raspasov 2020-05-28T17:59:09.015800Z

@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

bhauman 2020-05-28T17:59:22.016100Z

oh absolutely

bhauman 2020-05-28T18:00:20.017100Z

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

bhauman 2020-05-28T18:00:44.017800Z

I should clarify that in the docs I guess

raspasov 2020-05-28T18:01:14.018800Z

cool 🙂 yea I thought it would probably work;

bhauman 2020-05-28T18:01:15.018900Z

to bad NPM is kinda overloaded

raspasov 2020-05-28T18:02:37.020200Z

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)

👍 1
ingesol 2020-05-28T18:54:27.021100Z

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

🎉 3
bhauman 2020-05-28T19:19:16.021700Z

@ingesol Awesome!!

bhauman 2020-05-28T20:06:14.022900Z

released figwheel-main 0.2.7-SNAPSHOT with latest improvements

👍 2
🔥 5
🦜 2
just.sultanov 2020-05-29T07:43:20.032800Z

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

just.sultanov 2020-05-28T20:30:33.023Z

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"}}

bhauman 2020-05-28T20:34:34.023500Z

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

bhauman 2020-05-28T20:34:52.023700Z

@just.sultanov ^

bhauman 2020-05-28T20:36:52.023900Z

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

bhauman 2020-05-28T20:39:56.024100Z

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

bhauman 2020-05-28T20:40:25.024300Z

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

just.sultanov 2020-05-28T22:04:43.027200Z

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.sultanov 2020-05-28T22:06:48.027900Z

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

just.sultanov 2020-05-28T22:11:35.028400Z

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