Skip to content

Commit

Permalink
added tailwindcss, cleaned up the default stylesheets, and added tail…
Browse files Browse the repository at this point in the history
…wind and postcss configs
  • Loading branch information
jarodtaylor committed Sep 15, 2024
1 parent 5bd5b18 commit 0abc97e
Show file tree
Hide file tree
Showing 11 changed files with 1,149 additions and 60 deletions.
2 changes: 1 addition & 1 deletion app/frontend/entrypoints/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "~/stylesheets/index.css";
import "~/stylesheets/application.css";
import "~/controllers";
import "@hotwired/turbo-rails";
// To see this message, add the following to the `<head>` section in your
Expand Down
3 changes: 3 additions & 0 deletions app/frontend/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
8 changes: 0 additions & 8 deletions app/frontend/stylesheets/base.css

This file was deleted.

3 changes: 0 additions & 3 deletions app/frontend/stylesheets/index.css

This file was deleted.

36 changes: 0 additions & 36 deletions app/frontend/stylesheets/reset.css

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<% provide(:title, "Home") %>
<p>Find me in app/views/home/index.html.erb</p>
<p class="mb-10">Find me in app/views/home/index.html.erb</p>
<p>Stimulus says, <i data-controller=hello></i></p>
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
"postcss": "^8.4.24",
"rollup": "^4.2.0",
"stimulus-vite-helpers": "^3.1.0",
"tailwindcss": "^3.4.11",
"vite": "^5.0.0",
"vite-plugin-rails": "^0.5.0"
},
"devDependencies": {
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tailwindcss": "^3.17.4",
"path": "^0.12.7",
"prettier": "^3.3.3",
"run-pty": "^5"
}
}
5 changes: 4 additions & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
plugins: [require("autoprefixer")],
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Empty file added postcss.config.js
Empty file.
16 changes: 16 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import('tailwindcss').Config} */
// const colors = require('tailwindcss/colors')
// const defaultTheme = require('tailwindcss/defaultTheme')

module.exports = {
content: [
'./app/helpers/**/*.rb',
'./app/frontend/stylesheets/**/*.css',
'./app/views/**/*.{html,html.erb,erb}',
'./app/frontend/**/*.js',
],
theme: {
extend: {
},
},
}
Loading

0 comments on commit 0abc97e

Please sign in to comment.