{"id":46763690,"url":"https://github.com/beetleman/shadow-cljs-hooks","last_synced_at":"2026-03-09T22:25:45.176Z","repository":{"id":54067015,"uuid":"209425202","full_name":"beetleman/shadow-cljs-hooks","owner":"beetleman","description":"useful hooks for shadow-cljs","archived":false,"fork":false,"pushed_at":"2021-03-09T20:18:57.000Z","size":2728,"stargazers_count":14,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-02T20:28:14.919Z","etag":null,"topics":["build-tool","clojurescript","shadow-cljs"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beetleman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-19T00:04:04.000Z","updated_at":"2023-08-02T20:28:14.920Z","dependencies_parsed_at":"2022-08-13T06:21:07.673Z","dependency_job_id":null,"html_url":"https://github.com/beetleman/shadow-cljs-hooks","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/beetleman/shadow-cljs-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetleman%2Fshadow-cljs-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetleman%2Fshadow-cljs-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetleman%2Fshadow-cljs-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetleman%2Fshadow-cljs-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beetleman","download_url":"https://codeload.github.com/beetleman/shadow-cljs-hooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beetleman%2Fshadow-cljs-hooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["build-tool","clojurescript","shadow-cljs"],"created_at":"2026-03-09T22:25:44.472Z","updated_at":"2026-03-09T22:25:45.153Z","avatar_url":"https://github.com/beetleman.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/beetleman/shadow-cljs-hooks.svg?style=svg)](https://circleci.com/gh/beetleman/shadow-cljs-hooks)\n[![Clojars Project](https://img.shields.io/clojars/v/org.clojars.beetleman/shadow-cljs-hooks.svg)](https://clojars.org/org.clojars.beetleman/shadow-cljs-hooks)\n\n# shadow-cljs-hooks\n\nThis library provides collections of useful hooks for [shadow-cljs]:\n\n- `shadow-cljs-hooks.index` - generating `index.html`\n- `shadow-cljs-hooks.fulcro-css` - generating CSS file for [Fulcro3]\n\n## Getting Started\n\nAdd the following dependency to your `deps.edn` file:\n\n``` clojure\norg.clojars.beetleman/shadow-cljs-hooks {:mvn/version \"current version from clojars\"}\n```\n\nAdd some [build hook] to `shadow-cljs.edn`, eg. `shadow-cljs-hooks.index/hook`:\n\n``` clojure\n{...\n :builds\n {:app {:target ...\n        :build-hooks\n        [(shadow-cljs-hooks.index/hook)]\n        ...}}}}\n```\n\ncheckout [fulcro3 example] or [re-frame example] to seeing it in action.\n\n## Hooks\n\n### `shadow-cljs-hooks.index`\n\nGenerate `index.html`  based on provided options, works with `:module-hash-names true`.\n\n#### options\n\n- `:path` - (optional, default: generated from `:output-dir` and `:asset-path`) where `index.html`\nshould be located\n- `:lang` - (optional, default: `\"en\"`') `\u003chtml lang=...\u003e`\n- `:title` - (optional, default: `\"ClojureScript 🥳🏆\"`) `\u003ctitle\u003e...\u003c/title\u003e`\n- `:scripts` - (optional, default: `[]`) list of included `.js` files\n- `:entry-point` - (optional, default: `nil`) entry point for application, eg.: `app/init`.\nOptional because `:init-fn` in [modules configuration] can handle it\n- `:links` - (optional, default: `[]`) list of included `.css` files\n\n#### example\n\n``` clojure\n[(shadow-cljs-hooks.index/hook {:links   [\"https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css\"]\n                               :scripts [\"https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js\"]})]\n```\nUsed in More in [re-frame example] and [fulcro3 example]\n\n### `shadow-cljs-hooks.fulcro-css`\n\nGenerate `CSS` files from [fulcro3] project. Works with `index` hook.\n\n#### requirements\n\n- [garden]\n- [fulcro3]\n\n#### options\n\n- `:output-dir` (required) the directory to use for [garden] output\n- `:asset-path` (required) the relative path from web server’s root to the resources\nin `:output-dir`\n- `:component` (required) `Root` component from which `CSS` will be generated\n- `:garden-flags` (optional, default `{:pretty-print? false}`) [garden] flags\n\n#### example\n\n``` clojure\n[(shadow-cljs-hooks.fulcro-css/hook {:component  app.main/Root\n                                     :output-dir \"public/css\"\n                                     :asset-path \"/css\"})\n (shadow-cljs-hooks.index/hook)]\n```\n\nMore in [fulcro3 example]\n\n### `shadow-cljs-hooks.garden`\n\nGenerate `CSS` files from [garden] compatible vector. Works with `index` hook as well.\n\n#### requirements\n\n- [garden]\n\n#### options\n\n- `:output-dir` (required) the directory to use for [garden] output\n- `:asset-path` (required) the relative path from web server’s root to the resources\nin `:output-dir`\n- `:css` (required) symbol with definition of styles\n- `:garden-flags` (optional, default `{:pretty-print? false}`) [garden] flags\n\n#### example\n\n``` clojure\n[(shadow-cljs-hooks.garden/hook {:css        app.css/css\n                                 :output-dir \"public/css\"\n                                 :asset-path \"/css\"})\n (shadow-cljs-hooks.index/hook)]\n```\n\nMore in [re-frame example]\n\n## TODO\n\n- [x] pure garden hook\n- [x] reagent/reframe example\n- [ ] code cleanup\n\n[shadow-cljs]: https://github.com/thheller/shadow-cljs\n[fulcro3]: https://github.com/fulcrologic/fulcro\n[garden]: https://github.com/noprompt/garden\n[build hook]: https://shadow-cljs.github.io/docs/UsersGuide.html#build-hooks\n[fulcro3 example]: ./example/fulcro3\n[re-frame example]: ./example/re-frame\n[modules configuration]: https://shadow-cljs.github.io/docs/UsersGuide.html#_modules\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeetleman%2Fshadow-cljs-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeetleman%2Fshadow-cljs-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeetleman%2Fshadow-cljs-hooks/lists"}