From 050fb51111c8fa9cb6eb9e77d30e44ab0a565c13 Mon Sep 17 00:00:00 2001 From: palhimalaya Date: Sat, 7 Dec 2024 18:41:03 +0545 Subject: [PATCH 1/2] Replace sass-rails with cssbundling-rails --- .gitignore | 3 + Gemfile | 5 +- Gemfile.lock | 7 +- Procfile.dev | 1 + app/assets/builds/.keep | 0 app/assets/config/manifest.js | 2 +- app/assets/stylesheets/application.css | 15 --- app/assets/stylesheets/application.scss | 1 + app/javascript/stylesheets/application.scss | 23 ++-- app/views/layouts/application.html.erb | 1 + bin/dev | 11 ++ config/initializers/assets.rb | 5 + package.json | 7 +- tailwind.config.js | 6 +- yarn.lock | 135 ++++++++++++++++++-- 15 files changed, 175 insertions(+), 47 deletions(-) create mode 100644 app/assets/builds/.keep delete mode 100644 app/assets/stylesheets/application.css create mode 100644 app/assets/stylesheets/application.scss create mode 100755 bin/dev diff --git a/.gitignore b/.gitignore index c8827634e0..3c30b8accd 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,6 @@ yarn-debug.log* /config/credentials/test.key /config/credentials/production.key + +/app/assets/builds/* +!/app/assets/builds/.keep diff --git a/Gemfile b/Gemfile index cc7adfb57b..3d881a9871 100644 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,9 @@ gem "puma", "~> 6.4.3" # Use Tailwind CSS [https://github.com/rails/tailwindcss-rails] # gem "tailwindcss-rails", ">= 0.5.3" +# Use CSSBundling to bundle CSS +gem "cssbundling-rails", "~> 1.4" + # Build JSON APIs with ease [https://github.com/rails/jbuilder] gem "jbuilder", "~> 2.11" @@ -48,7 +51,6 @@ gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby] gem "bootsnap", ">= 1.4.4", require: false # Use Sass to process CSS -# gem "sassc-rails", "~> 2.1" # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] gem "image_processing", ">= 1.2" @@ -60,7 +62,6 @@ gem "shakapacker", "6.0.0" gem "react-rails", "2.6.2" # Use SCSS for stylesheets -gem "sass-rails" # #--- gems for server & infra configuration ---## gem "dotenv-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 5be226c5ac..e343ff44aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,6 +174,8 @@ GEM crack (0.4.5) rexml crass (1.0.6) + cssbundling-rails (1.4.1) + railties (>= 6.0.0) data_migrate (9.3.0) activerecord (>= 6.1) railties (>= 6.1) @@ -557,8 +559,6 @@ GEM bundler-audit (~> 0.9.0) rubyzip (2.3.2) safely_block (0.4.0) - sass-rails (6.0.0) - sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -667,6 +667,7 @@ PLATFORMS arm64-darwin-21 arm64-darwin-22 arm64-darwin-23 + arm64-darwin-24 x86_64-darwin-21 x86_64-darwin-22 x86_64-linux @@ -683,6 +684,7 @@ DEPENDENCIES bundler-audit capybara (>= 3.26) countries + cssbundling-rails (~> 1.4) data_migrate database_cleaner (~> 2.0) debug (>= 1.0.0) @@ -732,7 +734,6 @@ DEPENDENCIES rubocop-rspec ruby_audit rubyzip - sass-rails searchkick selenium-webdriver (>= 4.0.0) sentry-rails diff --git a/Procfile.dev b/Procfile.dev index 528c28b238..d3d74cc515 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,4 @@ web: bin/rails s -b 0.0.0.0 -p 3000 webpacker: bin/webpacker-dev-server solidqueue: bundle exec rake solid_queue:start +css: yarn build:css --watch diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index bf3209b374..15ea87ad4c 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,5 @@ //= link_tree ../images -//= link_directory ../stylesheets .css //= link_tree ../../javascript .js //= link_tree ../../../vendor/javascript .js //= link_tree ../js .js +//= link_tree ../builds diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index 288b9ab718..0000000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's - * vendor/assets/stylesheets directory can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the bottom of the - * compiled file so the styles you add here take precedence over styles defined in any other CSS - * files in this directory. Styles in this file should be added after the last require_* statement. - * It is generally better to create a new file per style scope. - * - *= require_tree . - *= require_self - */ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 0000000000..88d24c962f --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1 @@ +// Entry point for your Sass build diff --git a/app/javascript/stylesheets/application.scss b/app/javascript/stylesheets/application.scss index 02fcbee067..9b5f66f83b 100644 --- a/app/javascript/stylesheets/application.scss +++ b/app/javascript/stylesheets/application.scss @@ -1,15 +1,17 @@ -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; +@use "tailwindcss/base"; +@use "tailwindcss/components"; +@use "tailwindcss/utilities"; +@use "team"; +@use "time-tracking"; +@use "react-calendar"; +@use "toast"; +@use "pto"; +@use "authentication"; +@use "rc-steps"; +@use "navbar"; @import "react-toastify/dist/ReactToastify.min.css"; @import "react-responsive-carousel/lib/styles/carousel.min.css"; -@import "team"; -@import "time-tracking"; -@import "react-calendar"; -@import "toast"; -@import "pto"; -@import "authentication"; -@import "rc-steps"; + @layer base { @font-face { @@ -29,7 +31,6 @@ } @layer components { - @import "navbar"; .sidebar { &__container { box-shadow: -2px 6px 11px grey; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f85ea083a9..03d8682112 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,6 +7,7 @@ <%= csp_meta_tag %> <%= stylesheet_pack_tag "application" %> <%= javascript_pack_tag "application" %> + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000000..d80a02dbc1 --- /dev/null +++ b/bin/dev @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +if gem list --no-installed --exact --silent foreman; then + echo "Installing foreman..." + gem install foreman +fi + +# Default to port 3000 if not specified +export PORT="${PORT:-3000}" + +exec foreman start -f Procfile.dev --env /dev/null "$@" diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 101a2902e5..22785feb54 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -12,3 +12,8 @@ # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) + +# Setting `Rails.application.config.assets.css_compressor = nil` is disabling the CSS compression for +# assets in a Ruby on Rails application. By setting it to `nil`, the CSS files will not be compressed +# when they are served to the client. We are using cssbundling-rails gem to compress the CSS files. +Rails.application.config.assets.css_compressor = nil diff --git a/package.json b/package.json index f6f621cb69..64cd27e2ec 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "ramda": "^0.28.0", "rc-steps": "^6.0.0", "react": "^18.2.0", + "react_ujs": "^2.6.1", "react-calendar": "2.18.1", "react-circular-progressbar": "^2.1.0", "react-datepicker": "^4.11.0", @@ -73,8 +74,7 @@ "react-toastify": "^8.1.0", "react-tooltip": "^5.7.5", "react-transition-group": "4.4.5", - "react_ujs": "^2.6.1", - "sass": "^1.58.3", + "sass": "^1.82.0", "sass-loader": "^13.2.0", "shakapacker": "^6.0.0", "style-loader": "^3.3.1", @@ -132,7 +132,8 @@ }, "scripts": { "prepare": "husky install", - "lint": "eslint ./app/javascript" + "lint": "eslint ./app/javascript", + "build:css": "sass ./app/assets/stylesheets/application.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules" }, "babel": { "presets": [ diff --git a/tailwind.config.js b/tailwind.config.js index bbacf09eb8..bb1a6c2de8 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +1,9 @@ module.exports = { - purge: [], + purge: [ + "./app/**/*.html.erb", + "./app/helpers/**/*.rb", + "./app/javascript/**/*.js", + ], darkMode: false, // or 'media' or 'class' theme: { container: { diff --git a/yarn.lock b/yarn.lock index 93d4c7eba6..4bce38a413 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1648,6 +1648,95 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@parcel/watcher-android-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz#e32d3dda6647791ee930556aee206fcd5ea0fb7a" + integrity sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ== + +"@parcel/watcher-darwin-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz#0d9e680b7e9ec1c8f54944f1b945aa8755afb12f" + integrity sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw== + +"@parcel/watcher-darwin-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz#f9f1d5ce9d5878d344f14ef1856b7a830c59d1bb" + integrity sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA== + +"@parcel/watcher-freebsd-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz#2b77f0c82d19e84ff4c21de6da7f7d096b1a7e82" + integrity sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw== + +"@parcel/watcher-linux-arm-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz#92ed322c56dbafa3d2545dcf2803334aee131e42" + integrity sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA== + +"@parcel/watcher-linux-arm-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz#cd48e9bfde0cdbbd2ecd9accfc52967e22f849a4" + integrity sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA== + +"@parcel/watcher-linux-arm64-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz#7b81f6d5a442bb89fbabaf6c13573e94a46feb03" + integrity sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA== + +"@parcel/watcher-linux-arm64-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz#dcb8ff01077cdf59a18d9e0a4dff7a0cfe5fd732" + integrity sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q== + +"@parcel/watcher-linux-x64-glibc@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz#2e254600fda4e32d83942384d1106e1eed84494d" + integrity sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw== + +"@parcel/watcher-linux-x64-musl@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz#01fcea60fedbb3225af808d3f0a7b11229792eef" + integrity sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA== + +"@parcel/watcher-win32-arm64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz#87cdb16e0783e770197e52fb1dc027bb0c847154" + integrity sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig== + +"@parcel/watcher-win32-ia32@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz#778c39b56da33e045ba21c678c31a9f9d7c6b220" + integrity sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA== + +"@parcel/watcher-win32-x64@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz#33873876d0bbc588aacce38e90d1d7480ce81cb7" + integrity sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw== + +"@parcel/watcher@^2.4.1": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.5.0.tgz#5c88818b12b8de4307a9d3e6dc3e28eba0dfbd10" + integrity sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ== + dependencies: + detect-libc "^1.0.3" + is-glob "^4.0.3" + micromatch "^4.0.5" + node-addon-api "^7.0.0" + optionalDependencies: + "@parcel/watcher-android-arm64" "2.5.0" + "@parcel/watcher-darwin-arm64" "2.5.0" + "@parcel/watcher-darwin-x64" "2.5.0" + "@parcel/watcher-freebsd-x64" "2.5.0" + "@parcel/watcher-linux-arm-glibc" "2.5.0" + "@parcel/watcher-linux-arm-musl" "2.5.0" + "@parcel/watcher-linux-arm64-glibc" "2.5.0" + "@parcel/watcher-linux-arm64-musl" "2.5.0" + "@parcel/watcher-linux-x64-glibc" "2.5.0" + "@parcel/watcher-linux-x64-musl" "2.5.0" + "@parcel/watcher-win32-arm64" "2.5.0" + "@parcel/watcher-win32-ia32" "2.5.0" + "@parcel/watcher-win32-x64" "2.5.0" + "@phosphor-icons/react@^2.1.4": version "2.1.5" resolved "https://registry.npmjs.org/@phosphor-icons/react/-/react-2.1.5.tgz" @@ -2690,7 +2779,7 @@ chalk@^4.0, chalk@^4.0.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.2, chokidar@^3.5.3: +chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2705,6 +2794,13 @@ chalk@^4.0, chalk@^4.0.0, chalk@^4.1.2: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.1.tgz#4a6dff66798fb0f72a94f616abbd7e1a19f31d41" + integrity sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA== + dependencies: + readdirp "^4.0.1" + chownr@^1.1.1: version "1.1.4" resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz" @@ -3243,6 +3339,11 @@ destroy@1.2.0: resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz" @@ -4440,10 +4541,10 @@ immediate@~3.0.5: resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== -immutable@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz" - integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== +immutable@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.0.3.tgz#aa037e2313ea7b5d400cd9298fa14e404c933db1" + integrity sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -5244,6 +5345,11 @@ node-abort-controller@^3.0.1: resolved "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz" integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== +node-addon-api@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" + integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== + node-emoji@^1.11.0: version "1.11.0" resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz" @@ -6562,6 +6668,11 @@ readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readdirp@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" @@ -6772,14 +6883,16 @@ sass-loader@^13.2.0: klona "^2.0.6" neo-async "^2.6.2" -sass@^1.58.3: - version "1.60.0" - resolved "https://registry.npmjs.org/sass/-/sass-1.60.0.tgz" - integrity sha512-updbwW6fNb5gGm8qMXzVO7V4sWf7LMXnMly/JEyfbfERbVH46Fn6q02BX7/eHTdKpE7d+oTkMMQpFWNUMfFbgQ== +sass@^1.82.0: + version "1.82.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.82.0.tgz#30da277af3d0fa6042e9ceabd0d984ed6d07df70" + integrity sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q== dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" + chokidar "^4.0.0" + immutable "^5.0.2" source-map-js ">=0.6.2 <2.0.0" + optionalDependencies: + "@parcel/watcher" "^2.4.1" scheduler@^0.23.0: version "0.23.0" From ab4c6efc6048bd3c665d51b0ed4c5845493c5034 Mon Sep 17 00:00:00 2001 From: palhimalaya Date: Tue, 10 Dec 2024 09:26:27 +0545 Subject: [PATCH 2/2] Remove Sass comments and update stylesheet inclusion in application layout --- Gemfile | 4 ---- app/views/layouts/application.html.erb | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 3d881a9871..ecf3558af1 100644 --- a/Gemfile +++ b/Gemfile @@ -50,8 +50,6 @@ gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby] # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false -# Use Sass to process CSS - # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] gem "image_processing", ">= 1.2" @@ -61,8 +59,6 @@ gem "shakapacker", "6.0.0" # React hook for rails gem "react-rails", "2.6.2" -# Use SCSS for stylesheets - # #--- gems for server & infra configuration ---## gem "dotenv-rails" gem "foreman" diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 03d8682112..0b8ce2baa6 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,9 +5,8 @@ <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= stylesheet_pack_tag "application" %> - <%= javascript_pack_tag "application" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> + <%= javascript_pack_tag "application" %>