From d5dbeaf706f1b042a5674bff3b444c6d3ef1f651 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 23 Jan 2025 17:08:42 +0100 Subject: [PATCH] feat: add Tailwind CSS configuration and setup --- assets/styles/app.css | 4 + composer.json | 1 + composer.lock | 179 +++++++++++++++++++++++++++--------------- config/bundles.php | 1 + symfony.lock | 3 + tailwind.config.js | 11 +++ 6 files changed, 137 insertions(+), 62 deletions(-) create mode 100644 tailwind.config.js diff --git a/assets/styles/app.css b/assets/styles/app.css index e69de29..a90f074 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -0,0 +1,4 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + diff --git a/composer.json b/composer.json index b86e56b..4b8cfaf 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "symfony/runtime": "7.2.*", "symfony/twig-bundle": "7.2.*", "symfony/yaml": "7.2.*", + "symfonycasts/tailwind-bundle": "^0.7.1", "twig/extra-bundle": "^2.12|^3.0", "twig/twig": "^2.12|^3.0" }, diff --git a/composer.lock b/composer.lock index 7f0f548..5423c1f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f3fd6977697199afc45e15e0894a68d", + "content-hash": "067e56cfa1f8ef6de6103b4667e20eab", "packages": [ { "name": "composer/semver", @@ -2259,6 +2259,67 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/process", + "version": "v7.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-06T14:24:19+00:00" + }, { "name": "symfony/routing", "version": "v7.2.0", @@ -3092,6 +3153,61 @@ ], "time": "2024-10-23T06:56:12+00:00" }, + { + "name": "symfonycasts/tailwind-bundle", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/SymfonyCasts/tailwind-bundle.git", + "reference": "81c9e6ff2bb1a95e67fc6af04ca87fccdcf55aa4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SymfonyCasts/tailwind-bundle/zipball/81c9e6ff2bb1a95e67fc6af04ca87fccdcf55aa4", + "reference": "81c9e6ff2bb1a95e67fc6af04ca87fccdcf55aa4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/asset-mapper": "^6.3|^7.0", + "symfony/cache": "^6.3|^7.0", + "symfony/console": "^5.4|^6.3|^7.0", + "symfony/http-client": "^5.4|^6.3|^7.0", + "symfony/process": "^5.4|^6.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6", + "symfony/filesystem": "^6.3|^7.0", + "symfony/framework-bundle": "^6.3|^7.0", + "symfony/phpunit-bridge": "^6.3.9|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfonycasts\\TailwindBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ryan Weaver", + "homepage": "https://symfonycasts.com" + } + ], + "description": "Delightful Tailwind Support for Symfony + AssetMapper", + "keywords": [ + "asset-mapper", + "tailwind" + ], + "support": { + "issues": "https://github.com/SymfonyCasts/tailwind-bundle/issues", + "source": "https://github.com/SymfonyCasts/tailwind-bundle/tree/v0.7.1" + }, + "time": "2025-01-23T14:54:07+00:00" + }, { "name": "twig/extra-bundle", "version": "v3.18.0", @@ -3488,67 +3604,6 @@ } ], "time": "2025-01-15T00:21:40+00:00" - }, - { - "name": "symfony/process", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-11-06T14:24:19+00:00" } ], "aliases": [], diff --git a/config/bundles.php b/config/bundles.php index a6f9fbc..cf1b4a7 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -5,4 +5,5 @@ return [ Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + Symfonycasts\TailwindBundle\SymfonycastsTailwindBundle::class => ['all' => true], ]; diff --git a/symfony.lock b/symfony.lock index 2294f31..db900eb 100644 --- a/symfony.lock +++ b/symfony.lock @@ -93,6 +93,9 @@ "templates/base.html.twig" ] }, + "symfonycasts/tailwind-bundle": { + "version": "v0.7.1" + }, "twig/extra-bundle": { "version": "v3.18.0" } diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..bb226fb --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,11 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./assets/**/*.js", + "./templates/**/*.html.twig", + ], + theme: { + extend: {}, + }, + plugins: [], +}