Skip to content

Commit

Permalink
Include .client/.server directories in Tailwind globs (remix-run#9758)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Dalgleish <[email protected]>
  • Loading branch information
brettscott and markdalgleish authored Jul 26, 2024
1 parent aef2a00 commit 08731d9
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
- bogas04
- BogdanDevBst
- bolchowka
- brettscott
- brookslybrand
- brophdawg11
- bruno-oliveira
Expand Down
2 changes: 1 addition & 1 deletion docs/styling/tailwind.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Now we can tell it which files to generate classes from:
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion integration/hmr-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let files = {
"tailwind.config.js": js`
/** @type {import('tailwindcss').Config} */
export default {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion integration/postcss-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test.describe("PostCSS enabled", () => {
`,
"tailwind.config.js": js`
export default {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
spacing: {
'test': ${JSON.stringify(TEST_PADDING_VALUE)}
Expand Down
6 changes: 3 additions & 3 deletions integration/tailwind-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function runTests(ext: typeof extensions[number]) {
let tailwindConfig = ["mjs", "ts", "js"].includes(ext)
? js`
export default {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
spacing: {
'test': ${JSON.stringify(TEST_PADDING_VALUE)}
Expand All @@ -33,7 +33,7 @@ function runTests(ext: typeof extensions[number]) {
`
: js`
module.exports = {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
spacing: {
'test': ${JSON.stringify(TEST_PADDING_VALUE)}
Expand Down Expand Up @@ -364,7 +364,7 @@ test.describe("Tailwind disabled", () => {
files: {
"tailwind.config.js": js`
module.exports = {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
spacing: {
'test': ${JSON.stringify(TEST_PADDING_VALUE)}
Expand Down
2 changes: 1 addition & 1 deletion scripts/playground/template/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/cloudflare-workers/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/cloudflare/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/express/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/remix-javascript/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/remix/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down
2 changes: 1 addition & 1 deletion templates/spa/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Config } from "tailwindcss";

export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down

0 comments on commit 08731d9

Please sign in to comment.