
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@greenlabs/res-tailwindcss
Advanced tools
A ReScript PPX, which validates the tailwindcss class names
The tailwind-ppx is the only ppx to validate the tailwindcss class names in compile time. But, it was archived, and written by ocaml-migrate-parsetree
. My team considered taking over the repository and maintaining it but decided to rewrite it from the scratch with ppxlib
and menhir
. Additionally, we improve the logic to find the invalid class name with Spelling Corrector algorithm.
Plus, the arbitrary values in the JIT mode of Tailwindcss are supported!
<!-- arbitrary value examples -->
<div className=%twc("p-[75px]")> ... </div>
<div className=%twc("p-[calc(75px)]")> ... </div>
<div className=%twc("p-[calc(100%-40px)]")> ... </div>
<div className=%twc("bg-[#1da1f1]")> ... </div>
<div className=%twc("grid-cols-[1fr,700px,2fr]")> ... </div>
<div className=%twc("translate-x-[calc(-50%+27px)]")> ... </div>
<div className=%twc("!pb-[270px]")> ... </div>
<div className=%twc("after:content-['Hello_World']")> ... </div>
<div className=%twc("peer-checked:[&>svg]:rotate-180")> ... </div>
yarn add -D @greenlabs/res-tailwindcss
<path_to_tailwindcss>
should be replaced with the relative location of your generated tailwindcss file from your project root in which the bsconfig.json
file is located.
// bsconfig.json
"ppx-flags": [
...,
["@greenlabs/res-tailwindcss/ppx", "--path <path_to_tailwindcss>"]
],
<input type_="checkbox" className=%twc("peer") />
<div className=%twc("flex justify-center items-center after:content-['Hello_World'] peer-checked:[&>svg]:rotate-180")>
...
<svg />
</div>
opam switch create tailwindcss 4.14.0
opam install . --deps-only --with-test
opam exec -- dune build
cd rescript
(install dependencies)
yarn
(build --watch)
yarn res:clean && yarn res:watch
(run test --watch)
yarn test:watch
FAQs
ReScript PPX validates the tailwindcss class names
We found that @greenlabs/res-tailwindcss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.