Skip to content

Commit

Permalink
feat: use new unstable_tailwindcss flag
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Mar 16, 2023
1 parent b6a0442 commit 099bf5f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ node_modules
/cypress/screenshots
/cypress/videos
/postgres-data

/app/styles/tailwind.css
10 changes: 5 additions & 5 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
ScrollRestoration,
} from "@remix-run/react";

import { getUser } from "./session.server";
import tailwindStylesheetUrl from "./styles/tailwind.css";
import { getUser } from "~/session.server";
import stylesheet from "~/tailwind.css";

export const links: LinksFunction = () => {
return [{ rel: "stylesheet", href: tailwindStylesheetUrl }];
};
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: stylesheet },
];

export const meta: MetaFunction = () => ({
charset: "utf-8",
Expand Down
3 changes: 3 additions & 0 deletions app/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
"sideEffects": false,
"scripts": {
"build": "run-s build:*",
"build:css": "npm run generate:css -- --minify",
"build:remix": "remix build",
"build:server": "esbuild --platform=node --format=cjs ./server.ts --outdir=build --bundle",
"dev": "run-p dev:*",
"dev:build": "cross-env NODE_ENV=development npm run build:server -- --watch",
"dev:css": "cross-env NODE_ENV=development npm run generate:css -- --watch",
"dev:remix": "cross-env NODE_ENV=development remix watch",
"dev:server": "cross-env NODE_ENV=development node --inspect --require ./node_modules/dotenv/config --require ./mocks ./build/server.js",
"docker": "docker-compose up -d",
"format": "prettier --write .",
"generate:css": "tailwindcss -o ./app/styles/tailwind.css",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"setup": "prisma generate && prisma migrate deploy && prisma db seed",
"start": "cross-env NODE_ENV=production node ./build/server.js",
Expand Down Expand Up @@ -84,10 +81,10 @@
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
"prettier": "^2.8.3",
"prettier-plugin-tailwindcss": "^0.2.1",
"prettier-plugin-tailwindcss": "^0.2.3",
"prisma": "^4.9.0",
"start-server-and-test": "^1.15.2",
"tailwindcss": "^3.2.4",
"tailwindcss": "^3.2.6",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.2",
"typescript": "^4.9.4",
Expand Down
5 changes: 4 additions & 1 deletion remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
*/
module.exports = {
cacheDirectory: "./node_modules/.cache/remix",
ignoredRouteFiles: ["**/.*", "**/*.css", "**/*.test.{js,jsx,ts,tsx}"],
future: {
unstable_tailwind: true,
},
ignoredRouteFiles: ["**/.*", "**/*.test.{js,jsx,ts,tsx}"],
};
2 changes: 1 addition & 1 deletion 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/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down

0 comments on commit 099bf5f

Please sign in to comment.