From 42a57144ec86e226ae81d2bb1036edfb648a0527 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 14 Jan 2020 13:14:13 +0000 Subject: [PATCH] Install bourbon via gem --- Gemfile | 3 +++ Gemfile.lock | 8 +++++++ app/assets/stylesheets/application.scss | 27 ++++++--------------- config/application.rb | 2 +- config/initializers/assets.rb | 1 + package.json | 1 - yarn.lock | 32 +++++++++++++++++++------ 7 files changed, 45 insertions(+), 29 deletions(-) diff --git a/Gemfile b/Gemfile index c2d319073..6a14bb5ec 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,9 @@ source 'https://rubygems.org' gem 'rails', '5.2.0' gem 'webpacker', '~> 4.0.2' +gem 'bourbon' +gem "neat" + gem 'pg', '~> 0.21' gem 'activerecord-postgis-adapter', '5.1.0' gem 'dbf', '~> 2.0.7' diff --git a/Gemfile.lock b/Gemfile.lock index 6b4f11a59..4fb6cf932 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -771,6 +771,9 @@ GEM best_in_place (3.0.3) actionpack (>= 3.2) railties (>= 3.2) + bourbon (4.2.3) + sass (~> 3.4) + thor builder (3.2.4) byebug (9.1.0) capistrano (3.11.0) @@ -929,6 +932,9 @@ GEM multi_xml (0.6.0) multipart-post (2.0.0) mustermann (1.0.3) + neat (1.7.4) + bourbon (>= 4.0) + sass (>= 3.3) net-scp (2.0.0) net-ssh (>= 2.6.5, < 6.0.0) net-ssh (5.2.0) @@ -1111,6 +1117,7 @@ DEPENDENCIES autoprefixer-rails aws-sdk (= 3.0.1) best_in_place (~> 3.0.1) + bourbon byebug (~> 9.0, >= 9.0.5) bystander (= 2.0.0)! capistrano (= 3.11.0) @@ -1142,6 +1149,7 @@ DEPENDENCIES levenshtein (~> 0.2.2) minitest (~> 5.10, != 5.10.2) mocha (~> 1.0.0) + neat nokogiri (~> 1.10.4) pg (~> 0.21) phantompdf (~> 1.2.2) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 35eaa2d90..0883b8436 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,26 +1,13 @@ -/* - - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, 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 styles - * defined in the other CSS/SCSS files in this directory. It is generally better to create a new - * file per style scope. - * - * *= require_self - */ - // grids // Temporarily comment bourbon -@import '../../../node_modules/bourbon/core/bourbon.scss'; -@import '../../../node_modules/bourbon-neat/app/assets/stylesheets/neat.scss'; +@import 'bourbon'; +@import 'neat'; + +// /core/bourbon'; +// @import 'bourbon-neat/app/assets/stylesheets/neat'; -// maps -@import '../../../node_modules/leaflet/dist/leaflet.css'; +// // // maps +// @import 'leaflet/dist/leaflet'; @import './resources/mixins/rem-calc'; @import './resources/mixins/media-queries'; diff --git a/config/application.rb b/config/application.rb index 144a486c5..4d6138211 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,7 +29,7 @@ class Application < Rails::Application #{config.root}/app/presenters #{config.root}/app/serializers ) - config.assets.paths << Rails.root.join('node_modules') + # config.assets.paths << Rails.root.join('node_modules') config.assets.precompile += %w(base.js country.js home.js map.js protected_areas.js search.js resources.js content.js marine.js green_list.js region.js target_dashboard.js) config.assets.precompile += %w(d3/d3.js) config.assets.precompile += %w(d3/d3.min.js) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index f62357f39..6d618f188 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -12,3 +12,4 @@ # Rails.application.config.assets.precompile += %w( pdf.css ) Rails.application.config.assets.paths << Rails.root.join('node_modules') +Rails.application.config.assets.paths << Rails.root.join('node_modules/bourbon') diff --git a/package.json b/package.json index 979189e9e..566cc4550 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "dependencies": { "@rails/webpacker": "^4.0.2", "axios": "^0.19.0", - "bourbon": "^5.1.0", "bourbon-neat": "^1.9.0", "d3": "^5.9.2", "es6-object-assign": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index 08cf7ef23..dea76d9d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1313,11 +1313,6 @@ bourbon-neat@^1.9.0: dependencies: node-sass "^4.1.1" -bourbon@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bourbon/-/bourbon-5.1.0.tgz#84fa10de4c4e837602d8c2ec716d74bcb8915bad" - integrity sha512-rO4rwNAVNuzPmnL+DruxAe7DR2YFFo4nHsgDVRd9URMgDxtHmVBUnvFLXPan6teVe7jkybCyxcnR+CKClotj3g== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -4261,7 +4256,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.5, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5, lodash@~4.17.10: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -4733,7 +4728,30 @@ node-releases@^1.1.29: dependencies: semver "^6.3.0" -node-sass@^4.1.1, node-sass@^4.12.0: +node-sass@^4.1.1: + version "4.13.0" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.0.tgz#b647288babdd6a1cb726de4545516b31f90da066" + integrity sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA== + dependencies: + async-foreach "^0.1.3" + chalk "^1.1.1" + cross-spawn "^3.0.0" + gaze "^1.0.0" + get-stdin "^4.0.1" + glob "^7.0.3" + in-publish "^2.0.0" + lodash "^4.17.15" + meow "^3.7.0" + mkdirp "^0.5.1" + nan "^2.13.2" + node-gyp "^3.8.0" + npmlog "^4.0.0" + request "^2.88.0" + sass-graph "^2.2.4" + stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" + +node-sass@^4.12.0: version "4.12.0" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.12.0.tgz#0914f531932380114a30cc5fa4fa63233a25f017" integrity sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==