-
-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4113 from rubygems/segiddins/tailwind
POC adding tailwind
- Loading branch information
Showing
12 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,6 @@ coverage | |
REVISION | ||
/.env* | ||
/doc/erd.* | ||
|
||
/app/assets/builds/* | ||
!/app/assets/builds/.keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//= link application.css | ||
//= link application.js | ||
//= link_tree ../../../vendor/assets/images | ||
//= link_tree ../builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* @tailwind base; */ /* base disabled because the resets break the current site */ | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const defaultTheme = require("tailwindcss/defaultTheme"); | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
mode: "jit", | ||
prefix: "tw-", // While we still have non-tailwind classes | ||
content: [ | ||
"./app/views/**/*.rb", | ||
"./app/components/**/*rb", | ||
"./public/*.html", | ||
"./app/helpers/**/*.rb", | ||
"./app/javascript/**/*.js", | ||
"./app/views/**/*.{erb,haml,html,slim,rb}", | ||
], | ||
theme: { | ||
extend: { | ||
fontFamily: { | ||
sans: [ | ||
"Helvetica Neue", | ||
"Helvetica", | ||
"Arial", | ||
...defaultTheme.fontFamily.sans, | ||
], | ||
}, | ||
colors: { | ||
"rubygems-red": "#e74c3c", | ||
blackish: "#141c22", | ||
grayish: "#c1c4ca", | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
require("@tailwindcss/forms"), | ||
require("@tailwindcss/aspect-ratio"), | ||
require("@tailwindcss/typography"), | ||
require("@tailwindcss/container-queries"), | ||
], | ||
corePlugins: { | ||
preflight: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require "puma/plugin" | ||
|
||
Puma::Plugin.create do | ||
def start(launcher) | ||
in_background do | ||
warn "Starting TailwindCSS watcher..." | ||
system( | ||
File.expand_path("../../../bin/rails", __dir__), "--trace", "tailwindcss:watch", "RAILS_GROUPS=assets", | ||
%i[out err] => File.expand_path("../../../log/tailwind.log", __dir__), | ||
exception: true | ||
) | ||
rescue StandardError => e | ||
warn e.full_message(highlight: true) | ||
launcher.restart | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters