From bb39e333089e4d5f74c5e778247b65b2c71969d5 Mon Sep 17 00:00:00 2001 From: Shift Date: Mon, 24 Jan 2022 15:35:22 +0000 Subject: [PATCH 1/3] Bump dependencies for Laravel 9 --- composer.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index e728f720..a96f4bd2 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,26 @@ { - "name": "laravel-frontend-presets/tailwindcss", - "description": "Laravel frontend preset for Tailwind CSS", - "keywords": [ - "laravel", - "preset", - "tailwindcss" - ], - "license": "MIT", - "require": { - "laravel/framework": "^8.0", - "laravel/ui": "^3.0" - }, - "autoload": { - "psr-4": { - "LaravelFrontendPresets\\TailwindCssPreset\\": "src/" + "name": "laravel-frontend-presets/tailwindcss", + "description": "Laravel frontend preset for Tailwind CSS", + "keywords": [ + "laravel", + "preset", + "tailwindcss" + ], + "license": "MIT", + "require": { + "laravel/framework": "^9.0", + "laravel/ui": "^3.4" + }, + "autoload": { + "psr-4": { + "LaravelFrontendPresets\\TailwindCssPreset\\": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "LaravelFrontendPresets\\TailwindCssPreset\\TailwindCssPresetServiceProvider" + ] + } } - }, - "extra": { - "laravel": { - "providers": [ - "LaravelFrontendPresets\\TailwindCssPreset\\TailwindCssPresetServiceProvider" - ] - } - } } From 4b92525a16bc29412a51c53e82a866b814a61336 Mon Sep 17 00:00:00 2001 From: Michael Dyrynda Date: Fri, 1 Apr 2022 16:50:40 +1030 Subject: [PATCH 2/3] vue is no longer included in a default laravel install --- .../js/components/ExampleComponent.vue | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/tailwindcss-stubs/resources/js/components/ExampleComponent.vue diff --git a/src/tailwindcss-stubs/resources/js/components/ExampleComponent.vue b/src/tailwindcss-stubs/resources/js/components/ExampleComponent.vue deleted file mode 100644 index dc0d69da..00000000 --- a/src/tailwindcss-stubs/resources/js/components/ExampleComponent.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - From 2d0b9a49e1ef6f149e8b1a0130c6582265f69e3c Mon Sep 17 00:00:00 2001 From: Michael Dyrynda Date: Fri, 1 Apr 2022 16:51:08 +1030 Subject: [PATCH 3/3] update for Laravel 9 - closes #133 --- src/TailwindCssPreset.php | 12 +++++------- src/tailwindcss-stubs/resources/css/app.css | 8 +++----- .../resources/js/bootstrap.js | 19 +++---------------- src/tailwindcss-stubs/tailwind.config.js | 14 ++++---------- src/tailwindcss-stubs/webpack.mix.js | 14 ++++---------- 5 files changed, 19 insertions(+), 48 deletions(-) diff --git a/src/TailwindCssPreset.php b/src/TailwindCssPreset.php index b35bc499..3935c1a5 100644 --- a/src/TailwindCssPreset.php +++ b/src/TailwindCssPreset.php @@ -29,13 +29,11 @@ public static function installAuth() protected static function updatePackageArray(array $packages) { return array_merge([ - '@tailwindcss/ui' => '^0.3', - 'autoprefixer' => '^9.6', - 'laravel-mix' => '^5.0.1', - 'postcss-import' => '^12.0', - 'postcss-nested' => '^4.2', - 'tailwindcss' => '^1.8', - 'vue-template-compiler' => '^2.6.11', + '@tailwindcss/forms' => '^0.5', + 'autoprefixer' => '^10.4.4', + 'laravel-mix' => '^6.0.6', + 'postcss' => '^8.4.14', + 'tailwindcss' => '^3.0.23', ], Arr::except($packages, [ 'bootstrap', 'bootstrap-sass', diff --git a/src/tailwindcss-stubs/resources/css/app.css b/src/tailwindcss-stubs/resources/css/app.css index 2d039f47..b5c61c95 100644 --- a/src/tailwindcss-stubs/resources/css/app.css +++ b/src/tailwindcss-stubs/resources/css/app.css @@ -1,5 +1,3 @@ -@import "tailwindcss/base"; - -@import "tailwindcss/components"; - -@import "tailwindcss/utilities"; +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/src/tailwindcss-stubs/resources/js/bootstrap.js b/src/tailwindcss-stubs/resources/js/bootstrap.js index 0149ca28..e44ff026 100644 --- a/src/tailwindcss-stubs/resources/js/bootstrap.js +++ b/src/tailwindcss-stubs/resources/js/bootstrap.js @@ -1,17 +1,4 @@ -window._ = require('lodash'); - -/** - * We'll load jQuery and the Bootstrap jQuery plugin which provides support - * for JavaScript based Bootstrap features such as modals and tabs. This - * code may be modified to fit the specific needs of your application. - */ - -// try { -// window.Popper = require('popper.js').default; -// window.$ = window.jQuery = require('jquery'); - -// require('bootstrap'); -// } catch (e) {} +window._ = require("lodash"); /** * We'll load the axios HTTP library which allows us to easily issue requests @@ -19,9 +6,9 @@ window._ = require('lodash'); * CSRF token as a header based on the value of the "XSRF" token cookie. */ -window.axios = require('axios'); +window.axios = require("axios"); -window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; +window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; /** * Echo exposes an expressive API for subscribing to channels and listening diff --git a/src/tailwindcss-stubs/tailwind.config.js b/src/tailwindcss-stubs/tailwind.config.js index 89f63747..e14b302a 100644 --- a/src/tailwindcss-stubs/tailwind.config.js +++ b/src/tailwindcss-stubs/tailwind.config.js @@ -1,13 +1,7 @@ module.exports = { - purge: [ - './resources/views/**/*.blade.php', - './resources/css/**/*.css', - ], + content: ["./resources/views/**/*.blade.php", "./resources/css/**/*.css"], theme: { - extend: {} + extend: {}, }, - variants: {}, - plugins: [ - require('@tailwindcss/ui'), - ] -} + plugins: [require("@tailwindcss/forms")], +}; diff --git a/src/tailwindcss-stubs/webpack.mix.js b/src/tailwindcss-stubs/webpack.mix.js index 64b361bd..acf4488f 100644 --- a/src/tailwindcss-stubs/webpack.mix.js +++ b/src/tailwindcss-stubs/webpack.mix.js @@ -1,4 +1,4 @@ -const mix = require('laravel-mix'); +const mix = require("laravel-mix"); /* |-------------------------------------------------------------------------- @@ -12,15 +12,9 @@ const mix = require('laravel-mix'); */ mix - .js('resources/js/app.js', 'public/js') - .postCss('resources/css/app.css', 'public/css', [ - require('postcss-import'), - require('tailwindcss'), - require('postcss-nested'), - require('autoprefixer'), - ]); + .js("resources/js/app.js", "public/js") + .postCss("resources/css/app.css", "public/css", [require("tailwindcss")]); if (mix.inProduction()) { - mix - .version(); + mix.version(); }