Add Tailwind

This commit is contained in:
Kalle 2022-05-08 11:21:58 +03:00
parent 7eef77d824
commit 204713c602
6 changed files with 981 additions and 4 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ node_modules
/build
/public/build
.env
/app/tailwind.css

View File

@ -1,4 +1,6 @@
import type { MetaFunction } from "@remix-run/node";
import styles from "./tailwind.css";
import type { LinksFunction, MetaFunction } from "@remix-run/node";
import {
Links,
LiveReload,
@ -14,6 +16,8 @@ export const meta: MetaFunction = () => ({
viewport: "width=device-width,initial-scale=1",
});
export const links: LinksFunction = () => [{ rel: "stylesheet", href: styles }];
export default function App() {
return (
<html lang="en">

View File

@ -1,7 +1,7 @@
export default function Index() {
return (
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.4" }}>
<h1>Welcome to Remix</h1>
<h1 className="text-xl">Welcome to Remix</h1>
<ul>
<li>
<a

957
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,14 @@
"license": "",
"sideEffects": false,
"scripts": {
"build": "remix build",
"build": "run-s build:*",
"build:css": "npm run generate:css -- --minify",
"build:remix": "remix build",
"dev": "run-p dev:*",
"dev:css": "npm run generate:css -- --watch",
"dev:remix": "remix dev",
"generate:css": "npx tailwindcss -o ./app/tailwind.css",
"deploy": "fly deploy --remote-only",
"dev": "remix dev",
"start": "remix-serve build"
},
"dependencies": {
@ -23,6 +28,8 @@
"@types/react": "^17.0.24",
"@types/react-dom": "^17.0.9",
"eslint": "^8.11.0",
"npm-run-all": "^4.1.5",
"tailwindcss": "^3.0.24",
"typescript": "^4.5.5"
},
"engines": {

7
tailwind.config.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
content: ["./app/**/*.{ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
};