Skip to content

Commit

Permalink
chore(examples): update with-tailwind (#9764)
Browse files Browse the repository at this point in the history
### Description

With our newfound commitment to keeping the examples great, here are the
upgrades for `with-tailwind`.

### Testing Instructions

`npx create-turbo@latest --example
https://github.com/vercel/turborepo/tree/shew-e74f8/examples/with-tailwind`
  • Loading branch information
anthonyshew authored Jan 23, 2025
1 parent 8f87dea commit 6b56a79
Show file tree
Hide file tree
Showing 56 changed files with 971 additions and 2,139 deletions.
3 changes: 0 additions & 3 deletions examples/with-tailwind/apps/docs/.eslintrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

:root {
--foreground-rgb: 0, 0, 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function RootLayout({
children,
}: {
children: React.ReactNode;
}): JSX.Element {
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ function Gradient({
small?: boolean;
conic?: boolean;
className?: string;
}): JSX.Element {
}) {
return (
<span
className={`absolute mix-blend-normal will-change-[filter] rounded-[100%] ${
small ? "blur-[32px]" : "blur-[75px]"
} ${conic ? "bg-glow-conic" : ""} ${className}`}
} ${conic ? "bg-glow-conic" : ""} ${className ?? ""}`}
/>
);
}
Expand Down Expand Up @@ -43,7 +43,7 @@ const LINKS = [
},
];

export default function Page(): JSX.Element {
export default function Page() {
return (
<main className="flex flex-col items-center justify-between min-h-screen p-24">
<div className="z-10 items-center justify-between w-full max-w-5xl font-mono text-sm lg:flex">
Expand Down
4 changes: 4 additions & 0 deletions examples/with-tailwind/apps/docs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { nextJsConfig } from "@repo/eslint-config/next-js";

/** @type {import("eslint").Linter.Config} */
export default nextJsConfig;
2 changes: 1 addition & 1 deletion examples/with-tailwind/apps/docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
5 changes: 0 additions & 5 deletions examples/with-tailwind/apps/docs/next.config.js

This file was deleted.

12 changes: 12 additions & 0 deletions examples/with-tailwind/apps/docs/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
};

export default nextConfig;
8 changes: 5 additions & 3 deletions examples/with-tailwind/apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"name": "docs",
"version": "1.0.0",
"type": "module",
"private": true,
"scripts": {
"dev": "next dev --port 3001",
"build": "next build",
"start": "next start",
"lint": "next lint",
"type-check": "tsc --noEmit"
"lint": "next lint --max-warnings 0",
"check-types": "tsc --noEmit"
},
"dependencies": {
"@repo/ui": "workspace:*",
"@tailwindcss/postcss": "^4.0.0",
"next": "^15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Expand All @@ -25,7 +27,7 @@
"@types/react-dom": "^19.0.3",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"tailwindcss": "^4.0.0",
"typescript": "5.7.3"
}
}
8 changes: 2 additions & 6 deletions examples/with-tailwind/apps/docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors

module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@tailwindcss/postcss": {},
},
};
2 changes: 1 addition & 1 deletion examples/with-tailwind/apps/docs/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Config } from "tailwindcss";
import sharedConfig from "@repo/tailwind-config";

const config: Pick<Config, "content" | "presets"> = {
content: ["./src/app/**/*.tsx"],
content: ["./app/**/*.tsx"],
presets: [sharedConfig],
};

Expand Down
14 changes: 12 additions & 2 deletions examples/with-tailwind/apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.ts",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}
3 changes: 0 additions & 3 deletions examples/with-tailwind/apps/web/.eslintrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";

:root {
--foreground-rgb: 0, 0, 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function RootLayout({
children,
}: {
children: React.ReactNode;
}): JSX.Element {
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ function Gradient({
small?: boolean;
conic?: boolean;
className?: string;
}): JSX.Element {
}) {
return (
<span
className={`absolute mix-blend-normal will-change-[filter] rounded-[100%] ${
small ? "blur-[32px]" : "blur-[75px]"
} ${conic ? "bg-glow-conic" : ""} ${className}`}
} ${conic ? "bg-glow-conic" : ""} ${className ?? ""}`}
/>
);
}
Expand Down Expand Up @@ -43,7 +43,7 @@ const LINKS = [
},
];

export default function Page(): JSX.Element {
export default function Page() {
return (
<main className="flex flex-col items-center justify-between min-h-screen p-24">
<div className="z-10 items-center justify-between w-full max-w-5xl font-mono text-sm lg:flex">
Expand Down
4 changes: 4 additions & 0 deletions examples/with-tailwind/apps/web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { nextJsConfig } from "@repo/eslint-config/next-js";

/** @type {import("eslint").Linter.Config} */
export default nextJsConfig;
2 changes: 1 addition & 1 deletion examples/with-tailwind/apps/web/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
5 changes: 0 additions & 5 deletions examples/with-tailwind/apps/web/next.config.js

This file was deleted.

12 changes: 12 additions & 0 deletions examples/with-tailwind/apps/web/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
};

export default nextConfig;
10 changes: 6 additions & 4 deletions examples/with-tailwind/apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"name": "web",
"version": "1.0.0",
"type": "module",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev --port 3000",
"build": "next build",
"start": "next start",
"lint": "next lint",
"type-check": "tsc --noEmit"
"lint": "next lint --max-warnings 0",
"check-types": "tsc --noEmit"
},
"dependencies": {
"@repo/ui": "workspace:*",
"@tailwindcss/postcss": "^4.0.0",
"next": "^15.1.6",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Expand All @@ -25,7 +27,7 @@
"@types/react-dom": "^19.0.3",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"tailwindcss": "^4.0.0",
"typescript": "5.7.3"
}
}
8 changes: 2 additions & 6 deletions examples/with-tailwind/apps/web/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors

module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
"@tailwindcss/postcss": {},
},
};
2 changes: 1 addition & 1 deletion examples/with-tailwind/apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Config } from "tailwindcss";
import sharedConfig from "@repo/tailwind-config";

const config: Pick<Config, "content" | "presets"> = {
content: ["./src/app/**/*.tsx"],
content: ["./app/**/*.tsx"],
presets: [sharedConfig],
};

Expand Down
14 changes: 12 additions & 2 deletions examples/with-tailwind/apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
"next.config.ts",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}
11 changes: 5 additions & 6 deletions examples/with-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "with-tailwind",
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"type-check": "turbo type-check",
"clean": "turbo clean",
"dev": "turbo run dev",
"lint": "turbo run lint",
"check-types": "turbo check-types",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
Expand All @@ -16,6 +16,5 @@
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
},
"name": "with-tailwind"
}
}
37 changes: 0 additions & 37 deletions examples/with-tailwind/packages/config-eslint/library.js

This file was deleted.

Loading

0 comments on commit 6b56a79

Please sign in to comment.