{"id":28530869,"url":"https://github.com/duct-framework/duct-figwheel-component","last_synced_at":"2025-07-07T09:31:44.209Z","repository":{"id":62432474,"uuid":"41444092","full_name":"duct-framework/duct-figwheel-component","owner":"duct-framework","description":"A component for running Figwheel","archived":false,"fork":false,"pushed_at":"2019-04-09T12:49:02.000Z","size":26,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T08:22:27.891Z","etag":null,"topics":["clojure","clojurescript","duct","figwheel","repl"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duct-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-26T18:57:03.000Z","updated_at":"2022-04-26T11:59:34.000Z","dependencies_parsed_at":"2022-11-01T21:15:29.414Z","dependency_job_id":null,"html_url":"https://github.com/duct-framework/duct-figwheel-component","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duct-framework%2Fduct-figwheel-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duct-framework%2Fduct-figwheel-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duct-framework%2Fduct-figwheel-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duct-framework%2Fduct-figwheel-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duct-framework","download_url":"https://codeload.github.com/duct-framework/duct-figwheel-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duct-framework%2Fduct-figwheel-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258896314,"owners_count":22774515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","duct","figwheel","repl"],"created_at":"2025-06-09T14:37:40.672Z","updated_at":"2025-07-07T09:31:44.204Z","avatar_url":"https://github.com/duct-framework.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Duct-Figwheel-Component\n\nA [component][] for the [Figwheel][] development tool, designed to be\nused in the [Duct][] framework (but can be used in any component-based\nsystem).\n\n[component]: https://github.com/stuartsierra/component\n[figwheel]:  https://github.com/bhauman/lein-figwheel\n[duct]:      https://github.com/weavejester/duct\n\n## Installation\n\nAdd the following dependency to your `project.clj`:\n\n    [duct/figwheel-component \"0.3.4\"]\n\n## Usage\n\nRequire the library and the Component library:\n\n```clojure\n(require '[duct.component.figwheel :as figwheel]\n         '[com.stuartsierra.component :as component])\n```\n\nSetup the component with a Figwheel-compatible configuration:\n\n```clojure\n(def figwheel\n  (figwheel/server\n   {:css-dirs [\"resources/public/css\"]\n    :builds\n    [{:source-paths [\"src/cljs\"]\n      :build-options\n      {:output-to \"target/figwheel/public/main.js\"\n       :output-dir \"target/figwheel/public\"\n       :optimizations :none}}]}))\n```\n\nStart the server:\n\n```clojure\n(alter-var-root #'figwheel component/start)\n```\n\nEnsure that the client ClojureScript starts Figwheel as well:\n\n```clojure\n(figwheel.client/start {:websocket-url \"ws://localhost:3449/figwheel-ws\"})\n```\n\nUnlike the Leiningen plugin of Figwheel, this component does not\ntrigger builds automatically. Instead, you have the following\nfunctions at the REPL:\n\n```clojure\n(figwheel/build-cljs figwheel)    ;; build modified cljs files\n(figwheel/rebuild-cljs figwheel)  ;; build all cljs files\n(figwheel/refresh-css figwheel)   ;; refresh CSS files\n```\n\nRunning any of those functions will cause the updated code to be\npushed over websocket to any open clients.\n\nYou can also start a Piggieback REPL over the Figwheel connection:\n\n```clojure\n(figwheel/cljs-repl figwheel)           ;; uses first build\n(figwheel/cljs-repl figwheel build-id)  ;; uses specific build-id\n```\n\nThis REPL will allow you to evaluate ClojureScript on the browser.\n\nTo stop the server:\n\n```clojure\n(alter-var-root #'figwheel component/stop)\n```\n\n## License\n\nCopyright © 2019 James Reeves\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduct-framework%2Fduct-figwheel-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduct-framework%2Fduct-figwheel-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduct-framework%2Fduct-figwheel-component/lists"}