From e231ca912f9333d431c3b8d6458a13088e78be94 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 11 Jun 2022 13:56:24 -0300 Subject: [PATCH] compilar assets --- Gemfile | 8 +++++--- Gemfile.lock | 9 --------- Makefile | 2 +- app/assets/stylesheets/main.scss | 2 +- package.json | 1 + 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index d4dd1ce..5850c04 100644 --- a/Gemfile +++ b/Gemfile @@ -11,8 +11,6 @@ gem 'rails', '~> 6.1.4' gem 'pg', '~> 1.1' # Use Puma as the app server gem 'puma', '~> 5.0' -# Use SCSS for stylesheets -gem 'sass-rails', '>= 6' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '~> 5.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks @@ -29,10 +27,14 @@ gem 'ssh_data' gem 'anomaly_detection' -gem 'bootstrap' gem 'rails-i18n' gem 'hamlit' +if ENV['RAILS_GROUPS']&.split(',')&.include? 'assets' + puts 'Loading assets' + gem 'sass-rails', '>= 6' +end + group :development, :test do gem 'pry' end diff --git a/Gemfile.lock b/Gemfile.lock index f7dbed4..d3e8471 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,8 +63,6 @@ GEM anomaly_detection (0.1.4-x86_64-linux-musl) rice (>= 4.0.2) ast (2.4.2) - autoprefixer-rails (10.4.2.0) - execjs (~> 2) bcrypt (3.1.17-x86_64-linux-musl) bindex (0.8.1-x86_64-linux-musl) blazer (2.6.3) @@ -74,10 +72,6 @@ GEM safely_block (>= 0.1.1) bootsnap (1.11.1-x86_64-linux-musl) msgpack (~> 1.2) - bootstrap (5.1.3) - autoprefixer-rails (>= 9.1.0) - popper_js (>= 2.9.3, < 3) - sassc-rails (>= 2.0.0) brakeman (5.2.3) builder (3.2.4) chartkick (4.1.3) @@ -103,7 +97,6 @@ GEM exception_notification (4.5.0) actionmailer (>= 5.2, < 8) activesupport (>= 5.2, < 8) - execjs (2.8.1) factory_bot (6.2.1) activesupport (>= 5.0.0) ffi (1.15.5-x86_64-linux-musl) @@ -146,7 +139,6 @@ GEM parser (3.1.2.0) ast (~> 2.4.1) pg (1.3.5-x86_64-linux-musl) - popper_js (2.9.3) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) @@ -270,7 +262,6 @@ DEPENDENCIES anomaly_detection blazer bootsnap (>= 1.4.4) - bootstrap brakeman database_cleaner devise diff --git a/Makefile b/Makefile index 629fc2d..b6039d0 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ save: ## Subir la imagen Docker al nodo delegado # los assets que luego se suben al nodo delegado. assets := package.json yarn.lock $(shell find app/assets/ app/javascript/ -type f) public/packs/manifest.json.br: $(assets) - $(hain) 'RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile assets:clean' + $(hain) 'RAILS_GROUPS=assets RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile assets:clean' # Correr un test en particular por ejemplo # `make test/models/usuarie_test.rb` diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index cbd46a7..27e19b6 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -1 +1 @@ -@import "bootstrap"; +@import "bootstrap/scss/bootstrap"; diff --git a/package.json b/package.json index fcaebee..6b9a515 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "dependencies": { "@rails/ujs": "^6.0.0", "@rails/webpacker": "5.4.0", + "bootstrap": "~5.1", "turbolinks": "^5.2.0", "webpack": "^4.46.0", "webpack-cli": "^3.3.12"