Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to using cssbundling-rails #4142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.1'
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
gem "propshaft"
# Use Puma as the app server
gem 'puma', '~> 6.0'
# Use SCSS for stylesheets
gem 'sassc-rails'

gem 'turbo-rails', '~> 2.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
Expand Down Expand Up @@ -96,10 +93,8 @@ gem 'ebsco-eds'
gem 'sanitize', '~> 6.0' # "optional" dependency as of ebsco-eds 1.1.2
gem 'whenever', require: false # Work around https://github.com/javan/whenever/issues/831
gem 'bitly', '>= 2.0.0.beta' # For bit.ly
gem 'leaflet-rails' # Provides the stylesheet for Leaflet for the StackMap content.
gem 'recaptcha', github: 'ambethia/recaptcha', ref: '7866ec44c565a0f164f65066b97347d29a5f343f' # pinned until 5.17 is released
gem 'rinku', require: 'rails_rinku'
gem 'bootstrap', '~> 4.0'
gem 'rack-attack' # For throttle configuration
gem 'global_alerts'
gem 'view_component'
Expand All @@ -111,3 +106,5 @@ gem "jsbundling-rails", "~> 1.2"

gem "stimulus-rails", "~> 1.3"


gem "cssbundling-rails", "~> 1.4"
40 changes: 9 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ GEM
airbrussh (1.5.1)
sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.2)
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
base64 (0.2.0)
bcrypt (3.1.20)
bibtex-ruby (6.1.0)
Expand Down Expand Up @@ -131,10 +129,6 @@ GEM
view_component (>= 2.54, < 4)
bootsnap (1.18.3)
msgpack (~> 1.2)
bootstrap (4.6.2)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.16.1, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
Expand Down Expand Up @@ -191,6 +185,8 @@ GEM
csl (~> 1.0)
css_parser (1.16.0)
addressable
cssbundling-rails (1.4.0)
railties (>= 6.0.0)
date (3.3.4)
debug (1.9.1)
irb (~> 1.10)
Expand Down Expand Up @@ -234,7 +230,6 @@ GEM
edtf (3.1.1)
activesupport (>= 3.0, < 8.0)
erubi (1.12.0)
execjs (2.9.1)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -317,9 +312,6 @@ GEM
latex-decode (0.4.0)
launchy (2.5.2)
addressable (~> 2.8)
leaflet-rails (1.9.4)
actionpack (>= 4.2.0)
railties (>= 4.2.0)
letter_opener (1.9.0)
launchy (>= 2.2, < 3)
library_stdnums (1.6.0)
Expand Down Expand Up @@ -403,7 +395,11 @@ GEM
ast (~> 2.4.1)
racc
parslet (2.0.0)
popper_js (1.16.1)
propshaft (0.8.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
rack
railties (>= 7.0.0)
psych (5.1.2)
stringio
public_suffix (4.0.7)
Expand Down Expand Up @@ -536,14 +532,6 @@ GEM
sanitize (6.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
scrub_rb (1.0.1)
selenium-webdriver (4.18.1)
base64 (~> 0.2)
Expand All @@ -565,13 +553,6 @@ GEM
minitar
retriable
ruby-progressbar
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
sshkit (1.22.0)
Expand All @@ -586,7 +567,6 @@ GEM
railties (>= 6.0.0)
stringio (3.1.0)
thor (1.3.1)
tilt (2.3.0)
timeout (0.4.1)
traject (3.8.2)
concurrent-ruby (>= 0.8.0)
Expand Down Expand Up @@ -651,7 +631,6 @@ DEPENDENCIES
blacklight_dynamic_sitemap
blacklight_range_limit (~> 8.0)
bootsnap
bootstrap (~> 4.0)
capistrano (~> 3.0)
capistrano-bundler
capistrano-passenger
Expand All @@ -660,6 +639,7 @@ DEPENDENCIES
capybara (~> 3.0)
coderay
config
cssbundling-rails (~> 1.4)
debug
deprecation
devise
Expand All @@ -674,14 +654,14 @@ DEPENDENCIES
jbuilder (~> 2.7)
jsbundling-rails (~> 1.2)
launchy
leaflet-rails
letter_opener
mods_display (~> 1.1)
mysql2
newrelic_rpm
nokogiri (>= 1.7.1)
okcomputer
parslet (~> 2.0)
propshaft
puma (~> 6.0)
rack-attack
rack-mini-profiler (~> 2.0)
Expand All @@ -699,11 +679,9 @@ DEPENDENCIES
rubocop-rspec
ruby-oembed
sanitize (~> 6.0)
sassc-rails
selenium-webdriver
simplecov (~> 0.14)
solr_wrapper
sprockets-rails
sqlite3
stimulus-rails (~> 1.3)
turbo-rails (~> 2.0)
Expand Down
1 change: 1 addition & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
js: yarn build --watch
css: yarn build:css --watch
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ task(:default).clear
task default: [:ci]

desc "Execute the test build that runs in CI"
task ci: %i[rubocop environment] do
task ci: ['rubocop', 'environment', 'test:prepare'] do
require 'solr_wrapper'

ENV['environment'] = 'test'
Expand Down
2 changes: 0 additions & 2 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//= link_tree ../images
//= link_tree ../fonts
//= link application.js
//= link application.css
//= link print.css
//= link_tree ../builds
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/*
* Used by blacklight_range_limit
*= require 'blacklight_range_limit'
*= require leaflet
*/
@import 'blacklight-range-limit/app/assets/stylesheets/blacklight_range_limit.css';
@import 'leaflet/dist/leaflet.css';

// SUL Style Variables/Mixins
@import 'deja-vu-font';
Expand All @@ -11,6 +8,6 @@

@import 'blacklight';
@import 'searchworks';
@import 'font-awesome';
@import 'font-awesome/scss/font-awesome.scss';
@import '_sul-icons-rails';
@import 'bootstrap-icons';
6 changes: 3 additions & 3 deletions app/assets/stylesheets/blacklight.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@import 'bootstrap-variables';
@import 'bootstrap';
@import 'bootstrap/scss/bootstrap.scss';
@import 'bootstrap-mixins';

@import 'bootstrap-overrides';

@import 'blacklight/blacklight';
@import 'blacklight-frontend/app/assets/stylesheets/blacklight/blacklight.scss';
@import 'blacklight_marc';

@import 'blacklight/hierarchy/hierarchy';
@import 'blacklight-hierarchy/app/assets/stylesheets/blacklight/hierarchy/hierarchy.scss';

// the default bootstrap font-family list includes "Segoe UI Emoji", which, on windows
// renders our remove icon as an emoji-sized x instead of what we see on all other platforms...
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/searchworks.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title><%= render_page_title %></title>
<%= opensearch_description_tag I18n.t('blacklight.application_name'), opensearch_catalog_path(format: 'xml') %>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag "application", media: "all" %>
<%= stylesheet_link_tag "application", media: "all", 'data-turbo-track' => true %>
<%= stylesheet_link_tag 'print', media: 'print' %>
<link href="https://www-media.stanford.edu/su-identity/css/su-identity.css" rel="stylesheet">
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap4.css" rel="stylesheet">
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
"@hotwired/turbo-rails": "^8.0.0",
"blacklight-frontend": "7",
"blacklight-hierarchy": "^6.1.2",
"blacklight-range-limit": "^8.3.0",
"blacklight-range-limit": "^8.5.0",
"bootstrap": "4",
"esbuild": "^0.19.4",
"fetch-jsonp": "^1.3.0",
"font-awesome": "^4.7",
"leaflet": "1",
"popper.js": "1"
"popper.js": "1",
"sass": "^1.72.0"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets"
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets",
"build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css ./app/assets/stylesheets/print.scss:./app/assets/builds/print.css --no-source-map --load-path=node_modules"
}
}
Loading
Loading