Setup cssbundling-rails

This commit is contained in:
Andreas Nedbal 2023-01-03 12:27:54 +01:00 committed by Andreas Nedbal
parent a13d3fe273
commit e910630ef0
8 changed files with 37 additions and 5 deletions

2
.gitignore vendored
View File

@ -11,6 +11,8 @@
/tmp
# precompiled assets/packs
/app/assets/builds/*
!/app/assets/builds/.keep
/public/assets
/public/packs
/public/packs-test

View File

@ -6,9 +6,13 @@ gem "i18n-js", "4.0"
gem "rails", "~> 6.1"
gem "rails-i18n", "~> 7.0"
gem "sprockets", "~> 4.1"
gem "sprockets-rails", :require => "sprockets/railtie"
gem "sassc-rails"
gem "cssbundling-rails", "~> 1.1"
gem "pg"
gem "sassc-rails"
gem "turbo-rails"
gem "bcrypt", "~> 3.1.18"

View File

@ -108,6 +108,8 @@ GEM
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
crass (1.0.6)
cssbundling-rails (1.1.2)
railties (>= 6.0.0)
database_cleaner (2.0.1)
database_cleaner-active_record (~> 2.0.0)
database_cleaner-active_record (2.0.1)
@ -474,9 +476,9 @@ GEM
simplecov
simplecov_json_formatter (0.1.4)
spring (4.1.0)
sprockets (3.7.2)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
@ -544,6 +546,7 @@ DEPENDENCIES
carrierwave (~> 2.0)
carrierwave_backgrounder!
colorize
cssbundling-rails (~> 1.1)
database_cleaner
devise (~> 4.0)
devise-async
@ -607,6 +610,8 @@ DEPENDENCIES
simplecov-cobertura
simplecov-json
spring (~> 4.1)
sprockets (~> 4.1)
sprockets-rails
tldv (~> 0.1.0)
turbo-rails
twitter

2
Procfile.dev Normal file
View File

@ -0,0 +1,2 @@
web: unset PORT && bin/rails server
css: yarn build:css --watch

8
bin/dev Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env sh
if ! gem list foreman -i --silent; then
echo "Installing foreman..."
gem install foreman
fi
exec foreman start -f Procfile.dev "$@"

View File

@ -1,13 +1,14 @@
{
"scripts": {
"lint": "yarn run eslint --ext .ts app/javascript",
"lint:fix": "yarn run eslint --ext .ts app/javascript --fix"
"lint:fix": "yarn run eslint --ext .ts app/javascript --fix",
"build:css": "sass ./app/assets/stylesheets/application.sass.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules"
},
"dependencies": {
"@babel/preset-typescript": "^7.18.6",
"@fontsource/lexend": "^4.5.13",
"@hotwired/stimulus": "^3.2.1",
"@hotwired/stimulus-webpack-helpers": "^1.0.1",
"@fontsource/lexend": "^4.5.13",
"@hotwired/turbo-rails": "^7.2.4",
"@melloware/coloris": "^0.16.1",
"@rails/request.js": "^0.0.8",
@ -22,6 +23,7 @@
"popper.js": "^1.16.1",
"rails_admin": "3.0.0",
"regenerator-runtime": "^0.13.11",
"sass": "^1.57.1",
"sweetalert": "1.1.3",
"toastify-js": "^1.12.0",
"typescript": "^4.9.4"

View File

View File

@ -6816,6 +6816,15 @@ sass@^1.38.0:
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"
sass@^1.57.1:
version "1.57.1"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.57.1.tgz#dfafd46eb3ab94817145e8825208ecf7281119b5"
integrity sha512-O2+LwLS79op7GI0xZ8fqzF7X2m/m8WFfI02dHOdsK5R2ECeS5F62zrwg/relM1rjSLy7Vd/DiMNIvPrQGsA0jw==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"
sax@~1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"