Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vendeka-nl/tailwind-config-php
Save your tailwind.config.js as a PHP file.
https://github.com/vendeka-nl/tailwind-config-php
npm-package php tailwind tailwindcss
Last synced: 10 days ago
JSON representation
Save your tailwind.config.js as a PHP file.
- Host: GitHub
- URL: https://github.com/vendeka-nl/tailwind-config-php
- Owner: vendeka-nl
- License: gpl-3.0
- Created: 2020-04-10T12:30:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T10:20:11.000Z (about 1 year ago)
- Last Synced: 2024-10-17T12:25:27.180Z (20 days ago)
- Topics: npm-package, php, tailwind, tailwindcss
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Use your TailwindCSS config in PHP
![npm (scoped)](https://img.shields.io/npm/v/@vendeka/tailwind-config-php)
## Installation
```
npm install --global @vendeka/tailwind-config-php
```## Usage
Browse to the directory where your [TailwindCSS config file](https://tailwindcss.com/docs/configuration/) is located and execute:
```
tw2php
```By default it reads `tailwind.config.js` and writes 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
theme->colors->gray->{500};
```Please remember that the PHP file does not automatically update.