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

Migrate to esbuild asset pipeline #579

Closed
wants to merge 3 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ config/docker/development/home/rails/.local
config/docker/development/home/rails/.yarnrc
config/docker/development/home/rails/.irb_history
config/docker/development/home/rails/.bash_history

/app/assets/builds/*
!/app/assets/builds/.keep
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ gem 'bootsnap'
gem 'carrierwave'
gem 'config'
gem 'countries'
gem 'cssbundling-rails', '~> 1.4'
gem 'database_cleaner'
gem 'faker'
gem 'i18n_data'
gem 'jsbundling-rails', '~> 1.3'
gem 'keycloak-api-rails'
gem 'language_list'
gem 'mimemagic', '~> 0.3.6'
Expand Down Expand Up @@ -66,3 +68,7 @@ group :test do
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]




11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ GEM
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
crass (1.0.6)
cssbundling-rails (1.4.0)
railties (>= 6.0.0)
database_cleaner (2.0.1)
database_cleaner-active_record (~> 2.0.0)
database_cleaner-active_record (2.0.0)
Expand Down Expand Up @@ -178,6 +180,8 @@ GEM
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
json (2.6.3)
json-jwt (1.15.3)
activesupport (>= 4.2)
Expand Down Expand Up @@ -210,6 +214,7 @@ GEM
rake
mini_magick (4.11.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
msgpack (1.6.0)
multipart-post (2.1.1)
Expand All @@ -225,6 +230,9 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.7.0)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
odf-report (0.7.3)
Expand Down Expand Up @@ -372,6 +380,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
Expand All @@ -386,9 +395,11 @@ DEPENDENCIES
carrierwave
config
countries
cssbundling-rails (~> 1.4)
database_cleaner
faker
i18n_data
jsbundling-rails (~> 1.3)
keycloak-api-rails
language_list
listen (~> 3.0.5)
Expand Down
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server
css: yarn build:css --watch
Empty file added app/assets/builds/.keep
Empty file.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/application.bootstrap.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'bootstrap/scss/bootstrap';
@import 'bootstrap-icons/font/bootstrap-icons';
11 changes: 11 additions & 0 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -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 "$@"
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "app",
"private": "true",
"dependencies": {
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": "^7.3.0",
"@popperjs/core": "^2.11.8",
"autoprefixer": "^10.4.17",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.3",
"nodemon": "^3.0.3",
"postcss": "^8.4.33",
"postcss-cli": "^11.0.0",
"sass": "^1.70.0"
}
}
Loading