Last active
February 27, 2021 19:30
-
-
Save danalloway/43df88939c32c69d0fb9c796737e89ba to your computer and use it in GitHub Desktop.
Remix v0.9.x & Tailwind v2.x
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
/* ./styles/global.css */ | |
@import url('https://rsms.me/inter/inter.css'); | |
@tailwind base; | |
@tailwind components; | |
/* custom styles */ | |
@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
{ | |
"private": true, | |
"name": "remix-starter-express", | |
"version": "1.0.0", | |
"scripts": { | |
"prebuild": "postcss styles --base styles --dir app/ --env production", | |
"build": "remix build", | |
"dev": "pm2-dev pm2.config.js", | |
"start": "node server.js" | |
}, | |
"dependencies": { | |
"@remix-run/cli": "^0.9.1", | |
"@remix-run/data": "^0.9.1", | |
"@remix-run/express": "^0.9.1", | |
"@remix-run/react": "^0.9.1", | |
"compression": "^1.7.4", | |
"express": "^4.17.1", | |
"express-session": "^1.17.1", | |
"morgan": "^1.10.0", | |
"pm2": "^4.5.1", | |
"react": "^17.0.1", | |
"react-dom": "^17.0.1", | |
"react-router": "^6.0.0-beta.0", | |
"react-router-dom": "^6.0.0-beta.0" | |
}, | |
"devDependencies": { | |
"@tailwindcss/aspect-ratio": "^0.2.0", | |
"@tailwindcss/forms": "^0.2.1", | |
"@tailwindcss/typography": "^0.4.0", | |
"@types/react": "^17.0.0", | |
"@types/react-dom": "^17.0.0", | |
"autoprefixer": "^10.2.1", | |
"postcss": "^8.2.4", | |
"postcss-cli": "^8.3.1", | |
"tailwindcss": "^2.0.2", | |
"typescript": "^4.1.2" | |
}, | |
"engines": { | |
"node": "12" | |
} | |
} |
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
module.exports = { | |
apps: [ | |
{ | |
name: "Express", | |
script: "server.js", | |
ignore_watch: ["app/**/*.css"], | |
watch: ["remix.config.js", "app"], | |
watch_options: { | |
followSymlinks: false, | |
}, | |
env: { | |
NODE_ENV: "development", | |
}, | |
}, | |
{ | |
name: "Remix", | |
script: "remix run", | |
ignore_watch: ["."], | |
env: { | |
NODE_ENV: "development", | |
}, | |
}, | |
{ | |
name: "Styles", | |
script: "postcss styles --base styles --dir app/ -w", | |
ignore_watch: ["."], | |
env: { | |
NODE_ENV: "development", | |
}, | |
}, | |
], | |
}; |
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
module.exports = { | |
plugins: { | |
tailwindcss: {}, | |
autoprefixer: {}, | |
}, | |
}; |
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
const defaultTheme = require("tailwindcss/defaultTheme"); | |
module.exports = { | |
purge: [ | |
"./app/**/*.ts", | |
"./app/**/*.tsx", | |
"./app/**/*.mdx", | |
"./app/**/*.md", | |
"./remix.config.js", | |
], | |
darkMode: false, // or 'media' or 'class' | |
theme: { | |
extend: { | |
fontFamily: { | |
sans: ["Inter var", ...defaultTheme.fontFamily.sans], | |
}, | |
}, | |
}, | |
variants: { | |
extend: {}, | |
}, | |
plugins: [ | |
require("@tailwindcss/forms"), | |
require("@tailwindcss/typography"), | |
require("@tailwindcss/aspect-ratio"), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notes
npm i -D tailwindcss@latest @tailwindcss/forms @tailwindcss/typography @tailwindcss/aspect-ratio postcss@latest postcss-cli@latest autoprefixer@latest
app/global.css
file/styles/global.css
at the root of your Remix project and make it look like what is in the GISTpm2.config.js
prebuild
script inpackage.json