1.1.0 • Published 6 years ago
@vendeka/tailwind-config-php v1.1.0
Use your TailwindCSS config in PHP
Installation
npm install --global @vendeka/tailwind-config-phpUsage
Browse to the directory where your TailwindCSS config file is located and execute:
tw2phpBy default it read tailwind.config.js and writes it to tailwind.config.php. You can override the file names using the --config/-c and --output/-o options.
tw2php -c tailwind.js -o config/tailwind.php
tw2php --config tailwind.js --output config/tailwind.phpNow you can use the resolved config in your PHP as an object.
<?php
$tailwind = require 'tailwind.config.php';
$tailwind->theme->colors->gray->{500};Please remember that the PHP file does not automatically update.