Skip to content

Commit c09ac03

Browse files
author
David Heinemeier Hansson
committed
Merge branch 'main' of github.com:rails/tailwindcss-rails into main
2 parents 736ecb3 + 16aed84 commit c09ac03

File tree

4 files changed

+196780
-96318
lines changed

4 files changed

+196780
-96318
lines changed

.github/workflows/update-tailwind.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update Tailwind
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Update app/assets/stylesheets/tailwind.css
15+
run: |
16+
npx tailwindcss-cli@latest build -o app/assets/stylesheets/tailwind.css
17+
- name: Commit files
18+
run: |
19+
TAILWIND_CSS_VERSION=`npm view tailwindcss@latest version`
20+
git config --local user.email "github-actions@example.com"
21+
git config --local user.name "GitHub Actions"
22+
git add app/assets/stylesheets/tailwind.css
23+
git commit -am "[nodoc] Updating Tailwind CSS to $TAILWIND_CSS_VERSION" || echo "No changes to commit"
24+
- name: Push changes
25+
uses: ad-m/github-push-action@master
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
branch: ${{ github.ref }}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This gem just gives access to the standard Tailwind CSS framework. If you need t
1212
1. Run `./bin/bundle add tailwindcss-rails`
1313
2. Run `./bin/rails tailwindcss:install` (on a fresh Rails application)
1414

15-
The last option adds the purger compressor to `config/environments/production.rb`. This ensures that when `assets:precompile` is called during deployment that the unused class names are not included in the tailwind output css used by the app. It also adds a `javascript_link_tag "tailwind"` to your `app/views/application.html.erb` file.
15+
The last option adds the purger compressor to `config/environments/production.rb`. This ensures that when `assets:precompile` is called during deployment that the unused class names are not included in the tailwind output css used by the app. It also adds a `stylesheet_link_tag "tailwind"` to your `app/views/application.html.erb` file.
1616

1717
You can do both things yourself, if you've changed the default setup.
1818

0 commit comments

Comments
 (0)