opam-tailwindcss Tailwind Templates

Opam Tailwindcss

Tailwind CSS prebuild command line as an opam package

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/e5bb6361a50c7cc5cad802311e609336583ca08f.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.

Top categories

Loading Svelte Themes