1.1.0 • Published 5 years ago

@vendeka/tailwind-config-php v1.1.0

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
5 years ago

Use your TailwindCSS config in PHP

npm (scoped)

Installation

npm install --global @vendeka/tailwind-config-php

Usage

Browse to the directory where your TailwindCSS config file is located and execute:

tw2php

By 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.php

Now 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.

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago