Skip to content

Commit

Permalink
Update to Tailwind v4
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed Jan 23, 2025
1 parent 248396f commit a2366c5
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 817 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
- Update `rubocop-rails` to `2.28.0`
- Update `sidekiq` to `7.3.7`
- Update `stimulus-rails` to `1.3.4`
- Update `turb-rails` to `2.0.11`
- Update `turbo-rails` to `2.0.11`

#### Front-end dependencies

- Update `@hotwired/turbo-rails` to `8.0.20`
- Update `esbuild` to `0.24.2`
- Update `postcss` to `8.5.1`
- Update `tailwindcss` to `3.4.17`
- Update `tailwindcss` to `4.0.0`
- Update `@tailwindcss/cli` to `4.0.0`
- Update `@tailwindcss/postcss` to `4.0.0`

## [0.9.0] - 2024-08-09

Expand Down
8 changes: 1 addition & 7 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
/*
* Your custom CSS goes here but before adding a lot of CSS check this out:
* https://tailwindcss.com/docs/extracting-components
*/
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@import "tailwindcss" source("/app");
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</p>
</div>
<div class="mt-2 order-3 w-full sm:mt-0 sm:w-auto">
<div class="rounded-md shadow-sm">
<div class="rounded-md shadow-xs">
<span class="flex items-center justify-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md text-white bg-gray-500">
RAILS_ENV = <%= Rails.env %>
</span>
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"dependencies": {
"@hotwired/stimulus": "3.2.2",
"@hotwired/turbo-rails": "8.0.12",
"autoprefixer": "10.4.20",
"esbuild": "0.24.2",
"postcss": "8.5.1",
"postcss-import": "16.1.0",
"tailwindcss": "3.4.17"
"tailwindcss": "4.0.0",
"@tailwindcss/cli": "4.0.0",
"@tailwindcss/postcss": "4.0.0"
},
"scripts": {
"build": "./run yarn:build",
Expand Down
7 changes: 0 additions & 7 deletions postcss.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function yarn:build:css {
args=(--watch)
fi

tailwindcss --postcss \
tailwindcss \
-i ./app/assets/stylesheets/application.tailwind.css \
-o ./app/assets/builds/application.css "${args[@]}"
}
Expand Down
11 changes: 3 additions & 8 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
module.exports = {
content: [
'./app/views/**/*.html.erb',
'./app/helpers/**/*.rb',
'./app/assets/stylesheets/**/*.css',
'./app/javascript/**/*.js'
]
}
export default {
plugins: ["@tailwindcss/postcss"],
};
1,084 changes: 298 additions & 786 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit a2366c5

Please sign in to comment.