Tailwind CSS prebuild command line as an opam package
  • Shell 94%
  • Dune 6%
Find a file
2025-10-16 11:31:53 +02:00
bin Upgrade to tailwind v3.4.18 2025-10-16 11:31:05 +02:00
.gitattributes Mark executables as binary files 2023-03-14 16:58:13 +01:00
.gitignore Prepare release 3.0.23 2022-04-09 14:12:11 +02:00
CHANGES.md Upgrade to tailwind v3.4.18 2025-10-16 11:31:05 +02:00
dune Add Windows arm64 build of tailwindcss 3.3.0 2023-03-29 11:16:43 +01:00
dune-project Test that tailwindcss is executable by calling its help 2022-12-02 15:22:18 +01:00
LICENSE Prepare release 3.0.23 2022-04-09 14:12:11 +02:00
LICENSE-3RD-PARTY Initial commit 2022-03-12 01:08:54 +01:00
README.md Update README.md 2025-10-16 11:31:05 +02:00
tailwindcss.opam Add Windows arm64 build of tailwindcss 3.3.0 2023-03-29 11:16:43 +01:00
update.sh Improve update script 2025-10-16 11:31:53 +02:00

opam-tailwindcss

Tailwind CSS is a an utility-first CSS framework for rapidly building custom user interfaces.

This opam package wraps the standalone executable version of the Tailwind CSS 3 framework. These executables are platform specific. Upon installation, opam will automatically pick the correct executable for your platform and install it as a tailwindcss binary. Supported platforms are Linux arm64, Linux x64, macOS arm64, macOS x64, Windows arm64, and Windows x64.

Once installed, you can execute the binary with:

opam exec -- tailwindcss

Here is a dune rule that uses the installed binary to generate a CSS file:

(rule
  (target main.css)
  (deps
    (:config %{workspace_root}/tailwind.config.js)
    (:input src/ocamlorg_frontend/css/styles.css))
  (action
    (chdir
    %{workspace_root}
    (run tailwindcss -c %{config} -i %{input} -o %{target}))))

Installation

You may use an opam pin-depends to depend on this package. Prefer the .tar.gz version to have a lighter download.

pin-depends: [
  ["tailwindcss.dev" "https://github.com/tmattio/opam-tailwindcss/archive/b50699e860bcc7a467eaa7a4e172fea57881a280.tar.gz"]
]

You can install opam-tailwindcss using opam:

opam install tailwindcss

License

opam-tailwindcss is released under the ISC License. Tailwind CSS is released under the MIT License.