lapis / tailwind
Tailwind CSS for Lapis CMS: ./lapis tailwind:build with the standalone CLI, no Node.js
Requires
- php: ^8.5
- lapis/cms: ^1.0
Requires (Dev)
- carthage-software/mago: ^1.62
- pestphp/pest: ^5.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Tailwind CSS for Lapis CMS, without Node.js: it runs Tailwind's standalone CLI, downloaded once into storage/tailwind/ and checked against the release's SHA-256.
composer require --dev lapis/tailwind # or without --dev, if the server builds on deploy ./lapis tailwind:build # the first run writes assets/css/tailwind.css ./lapis tailwind:build --watch # while you work
Then use the result as the site's CSS in importmap.php:
'app.css' => ['path' => 'build/app.css'],
What it does
| What | Where |
|---|---|
tailwind:build [--watch] [--minify]: assets/css/tailwind.css → assets/build/app.css; writes the input with @source "../../pages" and "../../components" the first time |
src/TailwindCommands.php, src/Tailwind.php |
a minified build on ./lapis assets:compile (so on ./lapis deploy); a failed build stops the compile |
src/BuildTailwind.php |
a line in ./lapis doctor: built, not built or not used |
src/BuildTailwind.php |
Classes in other folders (a plugin's pages, app/) need an @source line of their own in assets/css/tailwind.css. Add assets/build/ to .gitignore when the server builds on deploy, or commit it when it does not.
Supported: Linux (x64, arm64, glibc or musl), macOS (x64, arm64), Windows (x64). The Tailwind version is pinned in Tailwind::VERSION; a new version is a new release of this package.