Hard to set the figwheel configurations

Open
#5 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
clojure

Research direction

Start at the figwheel-config function and inspect how :duct.server/figwheel and :duct.compiler/cljs are currently supplied. Compare the requested flexibility with the mentioned boot-reload and .cljs.edn approaches; the work is complete only when a concrete configurable approach supports changes such as :on-jsload and multiple development builds.

Written by the indexing model from the issue text.

Description

Currently, the the figwheel configuration will be generated by figwheel-config

(defn- figwheel-config [path main]
  {:duct.server/figwheel
   {:css-dirs ^:displace ["resources" "dev/resources"]
    :builds   ^:displace
    [{:id           "dev"
      :figwheel     true
      :source-paths ["dev/src" "src" ]
      :build-options
      {:main       main
       :output-to  (str path "/js/main.js")
       :output-dir (str path "/js")
       :asset-path "/js"
       :closure-defines {'goog.DEBUG true}
       :verbose    false
       :preloads   '[devtools.preload]
       :optimizations :none}}]}})  

which is hard to change like ':figwheel {:on-jsload "..."}', the only option is to override all the figwheel config.
when people needs multi builds (e.g. js per page, serverside rendering specific js) for development would be really hard to change the config.

Currently, I could only hard code all the configs under :duct.server/figwheel and :duct.compiler/cljs. It is not ideal, since the path and main would be hard-coded.

Would it be any better way to do it? like the boot-reload, .cljs.edn?

Dominant language
Clojure
Stars
2
Forks
6
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duct-framework/module.cljs

All issues in duct-framework/module.cljs

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.