{"id":19858667,"url":"https://github.com/teknql/shadow-cljs-tailwind-jit","last_synced_at":"2025-10-21T23:49:39.996Z","repository":{"id":38018037,"uuid":"363722987","full_name":"teknql/shadow-cljs-tailwind-jit","owner":"teknql","description":"Shadow build hooks for enabling JIT compilation of Tailwind CSS","archived":false,"fork":false,"pushed_at":"2024-11-10T23:15:32.000Z","size":16,"stargazers_count":96,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T09:31:02.442Z","etag":null,"topics":["clojurescript","shadow-cljs","tailwindcss"],"latest_commit_sha":null,"homepage":"","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/teknql.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-02T18:33:09.000Z","updated_at":"2025-01-17T22:41:50.000Z","dependencies_parsed_at":"2024-11-11T00:19:42.803Z","dependency_job_id":"c047805b-f00b-4397-bfc5-e8e9b9a79738","html_url":"https://github.com/teknql/shadow-cljs-tailwind-jit","commit_stats":{"total_commits":17,"total_committers":5,"mean_commits":3.4,"dds":0.4117647058823529,"last_synced_commit":"580e0174dfb43f27a85090bd4e6241645b84e931"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teknql%2Fshadow-cljs-tailwind-jit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teknql%2Fshadow-cljs-tailwind-jit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teknql%2Fshadow-cljs-tailwind-jit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teknql%2Fshadow-cljs-tailwind-jit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teknql","download_url":"https://codeload.github.com/teknql/shadow-cljs-tailwind-jit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972474,"owners_count":21673612,"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":["clojurescript","shadow-cljs","tailwindcss"],"created_at":"2024-11-12T14:24:13.702Z","updated_at":"2025-10-21T23:49:34.940Z","avatar_url":"https://github.com/teknql.png","language":"Clojure","funding_links":[],"categories":["Clojure"],"sub_categories":[],"readme":"# Shadow-Cljs Tailwind JIT\n[![Clojars Project](https://img.shields.io/clojars/v/com.teknql/shadow-cljs-tailwind-jit.svg)](https://clojars.org/com.teknql/shadow-cljs-tailwind-jit)\n\nBuild hooks for enabling [Tailwind\nJIT](https://tailwindcss.com/docs/just-in-time-mode) within Shadow Projects.\n\n## Installation and configuration\n\nInstall the required node dependencies in your project:\n\n```\nnpm install --save-dev tailwindcss@^3.1.2\n```\n\nAdd the clojure library to your project via your preferred method (either\nshadow's own `deps` or in your `deps.edn` file).\n\n```clj\n{com.teknql/shadow-cljs-tailwind-jit\n {:mvn/version \"1.0.0\"}}\n```\n\nNext, add the required build hooks to your `shadow-cljs.edn` build configuration:\n\n\n```clj\n{:builds\n {:ui\n  {;; ...\n   :dev\n   {:build-hooks\n    [(teknql.tailwind/start-watch!)]}}\n   :release\n   {:build-hooks\n    [(teknql.tailwind/compile-release!)]}\n   :devtools\n   {:http-root   \"resources/public/\" ;; Must be set to infer default purge targets.\n    :http-port   3000}\n   :tailwind/output \"resources/public/css/site.css\"}}}\n```\n\n## Customization\n\nThe following options are supported via namespaced keys within the `shadow-cljs` build config:\n\n\n- `:tailwind/output` - Where the generated CSS will be written to. Default:\n  `resources/public/css/site.css`\n- `:tailwind/config` - A map that is used for the `tailwind.config.js`. Automatically encodes kebab\n  cased keys into camel cased.\n\nNote that editing the `:tailwind/config` could result in incompatible\nconfigurations, so please be careful.\n\n### Using with Tailwind Config Files\n\nIf your project is sufficiently complex, you may be best off using the\n`tailwind.config.js`, and a `.css` file entrypoint. In this\ncase you're just using shadow to manage your tailwindcss process. To do this you can\nuse the `:tailwind/files` variable.\n\n```clj\n{:tailwind/files\n  {:base-path \"./path\" ;; Path to directory housing `tailwind.config.js`\n   :tailwind.css \"./path/style.css\"}} ;; Path to tailwind entrypoint\n```\n\n## FAQ\n\n### How is this different from [jacekschae/shadow-cljs-tailwindcss](https://github.com/jacekschae/shadow-cljs-tailwindcss)?\n\nThe above project is a great example of how to get tailwindcss and postcss set up to use\nalong side a shadow-cljs project. When running it's `npm run dev` it will start shadow-cljs as well\nas a postcss watch process to continuously recompile your stylesheets. Since it uses tailwind and\npostcss directly, it is reliant on your project having some boilerplate (`tailwind.config.js`,\n`postcss.config.js` and `src/css/tailwind.css`) that those tools expect to be in place.\n\nThis project differs in two major ways:\n\n1) It instead uses shadow-cljs' build-hooks machinery to manage the postcss process. The end result\nis the same, but results in you being able to call `npx shadow-cljs server` and have the postcss\nprocess started for you. If you use tools in your editor to manage your shadow process (eg. cider)\nthen this will require less configuration.\n\n2) Rather than introduce the boilerplate files mentioned above, the build-hooks create a temporary\nproject with the required boilerplate, allowing you to omit the files from your project.\nConfiguration can still be provided using the `:tailwind/config` and `:postcss/config` entries\nin the build configuration of your project in your `shadow-cljs.edn`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteknql%2Fshadow-cljs-tailwind-jit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteknql%2Fshadow-cljs-tailwind-jit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteknql%2Fshadow-cljs-tailwind-jit/lists"}