From f7462223a0b5033412c127d7820ab40a042462c8 Mon Sep 17 00:00:00 2001 From: David Gay Date: Mon, 5 Apr 2021 21:25:43 -0400 Subject: Use tailwind's postcss 7 compatability version, and prove it's working --- app/controllers/home_controller.rb | 4 ++++ app/views/home/index.html.erb | 3 +++ config/routes.rb | 1 + package.json | 2 +- test/controllers/home_controller_test.rb | 8 +++++++ yarn.lock | 41 +++++++++++++++++--------------- 6 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 app/controllers/home_controller.rb create mode 100644 app/views/home/index.html.erb create mode 100644 test/controllers/home_controller_test.rb diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..95f2992 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,4 @@ +class HomeController < ApplicationController + def index + end +end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000..d87f31a --- /dev/null +++ b/app/views/home/index.html.erb @@ -0,0 +1,3 @@ +

Appendix Q

+ +

Testing Tailwind

diff --git a/config/routes.rb b/config/routes.rb index c06383a..0cdd7e0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html + root "home#index", as: :home end diff --git a/package.json b/package.json index b112fc7..285c168 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "@rails/activestorage": "^6.0.0", "@rails/ujs": "^6.0.0", "@rails/webpacker": "5.2.1", - "tailwindcss": "^2.1.1", + "tailwindcss": "npm:@tailwindcss/postcss7-compat", "turbolinks": "^5.2.0" }, "version": "0.1.0", diff --git a/test/controllers/home_controller_test.rb b/test/controllers/home_controller_test.rb new file mode 100644 index 0000000..caa97da --- /dev/null +++ b/test/controllers/home_controller_test.rb @@ -0,0 +1,8 @@ +require "test_helper" + +class HomeControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get home_path + assert_response :success + end +end diff --git a/yarn.lock b/yarn.lock index 6dcb8ce..ca9303f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1407,7 +1407,7 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^9.6.1: +autoprefixer@^9, autoprefixer@^9.6.1: version "9.8.6" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== @@ -5709,13 +5709,13 @@ postcss-initial@^3.0.0: lodash.template "^4.5.0" postcss "^7.0.2" -postcss-js@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-3.0.3.tgz#2f0bd370a2e8599d45439f6970403b5873abda33" - integrity sha512-gWnoWQXKFw65Hk/mi2+WTQTHdPD5UJdDXZmX073EY/B3BWnYjO4F4t0VneTCnCGQ5E5GsCdMkzPaTXwl3r5dJw== +postcss-js@^2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-2.0.3.tgz#a96f0f23ff3d08cec7dc5b11bf11c5f8077cdab9" + integrity sha512-zS59pAk3deu6dVHyrGqmC3oDXBdNdajk4k1RyxeVXCrcEDBUBHoIhE4QTsmhxgzXxsaqFDAkUZfmMa5f/N/79w== dependencies: camelcase-css "^2.0.1" - postcss "^8.1.6" + postcss "^7.0.18" postcss-lab-function@^2.0.1: version "2.0.1" @@ -5853,12 +5853,13 @@ postcss-modules-values@^3.0.0: icss-utils "^4.0.0" postcss "^7.0.6" -postcss-nested@5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.5.tgz#f0a107d33a9fab11d7637205f5321e27223e3603" - integrity sha512-GSRXYz5bccobpTzLQZXOnSOfKl6TwVr5CyAQJUPub4nuRJSOECK5AqurxVgmtxP48p0Kc/ndY/YyS1yqldX0Ew== +postcss-nested@^4: + version "4.2.3" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.2.3.tgz#c6f255b0a720549776d220d00c4b70cd244136f6" + integrity sha512-rOv0W1HquRCamWy2kFl3QazJMMe1ku6rCFoAAH+9AcxdbpDeBr6k968MLWuLjvjMcGEip01ak09hKOEgpK9hvw== dependencies: - postcss-selector-parser "^6.0.4" + postcss "^7.0.32" + postcss-selector-parser "^6.0.2" postcss-nesting@^7.0.0: version "7.0.1" @@ -6155,7 +6156,7 @@ postcss@^6.0.9: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: version "7.0.35" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== @@ -6164,7 +6165,7 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2 source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.6, postcss@^8.2.1: +postcss@^8.2.1: version "8.2.9" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.9.tgz#fd95ff37b5cee55c409b3fdd237296ab4096fba3" integrity sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q== @@ -7329,12 +7330,13 @@ svgo@^1.0.0: unquote "~1.1.1" util.promisify "~1.0.0" -tailwindcss@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.1.1.tgz#642f6038c9283a8e1454da34585b8b7c1a1e8877" - integrity sha512-zZ6axGqpSZOCBS7wITm/WNHkBzDt5CIZlDlx0eCVldwTxFPELCVGbgh7Xpb3/kZp3cUxOmK7bZUjqhuMrbN6xQ== +"tailwindcss@npm:@tailwindcss/postcss7-compat": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@tailwindcss/postcss7-compat/-/postcss7-compat-2.1.0.tgz#1393b99d9e60783990baa1b3e2ae69afac12f660" + integrity sha512-1Z6nPrkOp0Aa+NH5q6DYNizKf3qc6x735We0kpnIj1k5Cn+RkP69z+MpFLvz5lGGPRV/i+uS9uItoafnjIoZoQ== dependencies: "@fullhuman/postcss-purgecss" "^3.1.3" + autoprefixer "^9" bytes "^3.0.0" chalk "^4.1.0" chokidar "^3.5.1" @@ -7352,9 +7354,10 @@ tailwindcss@^2.1.1: normalize-path "^3.0.0" object-hash "^2.1.1" parse-glob "^3.0.4" + postcss "^7" postcss-functions "^3" - postcss-js "^3.0.3" - postcss-nested "5.0.5" + postcss-js "^2" + postcss-nested "^4" postcss-selector-parser "^6.0.4" postcss-value-parser "^4.1.0" pretty-hrtime "^1.0.3" -- cgit v1.2.3