From fb18d8453805beb142e9a0e5606c065734699d7a Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 7 Mar 2017 14:27:15 -0800 Subject: [PATCH] Configure sprockets precompiles using manifest.js --- .../assets/config/solidus_backend_manifest.js | 50 +++++++++++++++++++ backend/config/initializers/assets.rb | 8 +-- .../assets/config/solidus_core_manifest.js | 1 + core/config/initializers/assets.rb | 2 +- core/config/initializers/premailer_assets.rb | 1 - .../config/solidus_frontend_manifest.js | 6 +++ frontend/config/initializers/assets.rb | 9 +--- 7 files changed, 60 insertions(+), 17 deletions(-) create mode 100644 backend/app/assets/config/solidus_backend_manifest.js create mode 100644 core/app/assets/config/solidus_core_manifest.js delete mode 100644 core/config/initializers/premailer_assets.rb create mode 100644 frontend/app/assets/config/solidus_frontend_manifest.js diff --git a/backend/app/assets/config/solidus_backend_manifest.js b/backend/app/assets/config/solidus_backend_manifest.js new file mode 100644 index 00000000000..f4663b24d3c --- /dev/null +++ b/backend/app/assets/config/solidus_backend_manifest.js @@ -0,0 +1,50 @@ +//= link_tree ../images + +//= link spree/backend/all.js +//= link spree/backend/all.css + +//= link select2_locale_ar.js +//= link select2_locale_az.js +//= link select2_locale_bg.js +//= link select2_locale_ca.js +//= link select2_locale_cs.js +//= link select2_locale_da.js +//= link select2_locale_de.js +//= link select2_locale_el.js +//= link select2_locale_es.js +//= link select2_locale_et.js +//= link select2_locale_eu.js +//= link select2_locale_fa.js +//= link select2_locale_fi.js +//= link select2_locale_fr.js +//= link select2_locale_gl.js +//= link select2_locale_he.js +//= link select2_locale_hr.js +//= link select2_locale_hu.js +//= link select2_locale_id.js +//= link select2_locale_is.js +//= link select2_locale_it.js +//= link select2_locale_ja.js +//= link select2_locale_ka.js +//= link select2_locale_ko.js +//= link select2_locale_lt.js +//= link select2_locale_lv.js +//= link select2_locale_mk.js +//= link select2_locale_ms.js +//= link select2_locale_nl.js +//= link select2_locale_no.js +//= link select2_locale_pl.js +//= link select2_locale_pt-BR.js +//= link select2_locale_pt-PT.js +//= link select2_locale_ro.js +//= link select2_locale_rs.js +//= link select2_locale_ru.js +//= link select2_locale_sk.js +//= link select2_locale_sv.js +//= link select2_locale_th.js +//= link select2_locale_tr.js +//= link select2_locale_ug-CN.js +//= link select2_locale_uk.js +//= link select2_locale_vi.js +//= link select2_locale_zh-CN.js +//= link select2_locale_zh-TW.js diff --git a/backend/config/initializers/assets.rb b/backend/config/initializers/assets.rb index 784a2452218..efe83d5fe8f 100644 --- a/backend/config/initializers/assets.rb +++ b/backend/config/initializers/assets.rb @@ -1,7 +1 @@ -Rails.application.config.assets.precompile += %w[ - spree/backend/all* - fontawesome-webfont* - select2_locale* - jquery-ui/*.png - solidus-style-guide-logo.png -] +Rails.application.config.assets.precompile << 'solidus_backend_manifest.js' diff --git a/core/app/assets/config/solidus_core_manifest.js b/core/app/assets/config/solidus_core_manifest.js new file mode 100644 index 00000000000..ac907b36776 --- /dev/null +++ b/core/app/assets/config/solidus_core_manifest.js @@ -0,0 +1 @@ +//= link_tree ../images diff --git a/core/config/initializers/assets.rb b/core/config/initializers/assets.rb index 6d16aa2ca00..9f74f4d86b9 100644 --- a/core/config/initializers/assets.rb +++ b/core/config/initializers/assets.rb @@ -1 +1 @@ -Rails.application.config.assets.precompile += %w( logo/solidus_logo.png noimage/*.png ) +Rails.application.config.assets.precompile << 'solidus_core_manifest.js' diff --git a/core/config/initializers/premailer_assets.rb b/core/config/initializers/premailer_assets.rb deleted file mode 100644 index ea48309b687..00000000000 --- a/core/config/initializers/premailer_assets.rb +++ /dev/null @@ -1 +0,0 @@ -Rails.application.config.assets.precompile += %w( ink.css ) diff --git a/frontend/app/assets/config/solidus_frontend_manifest.js b/frontend/app/assets/config/solidus_frontend_manifest.js new file mode 100644 index 00000000000..5cda05f6a13 --- /dev/null +++ b/frontend/app/assets/config/solidus_frontend_manifest.js @@ -0,0 +1,6 @@ +//= link_tree ../../../vendor/assets/javascripts/jquery.validate/localization/ .js +// +//= link_tree ../images +// +//= link spree/frontend/all.js +//= link spree/frontend/all.css diff --git a/frontend/config/initializers/assets.rb b/frontend/config/initializers/assets.rb index 16fe09f94b7..7f473378c83 100644 --- a/frontend/config/initializers/assets.rb +++ b/frontend/config/initializers/assets.rb @@ -1,8 +1 @@ -Rails.application.config.assets.precompile += %w[ - spree/frontend/all* - jquery.validate/localization/messages_* - favicon.ico - spree/frontend/cart.png - credit_cards/* - icons/delete.png -] +Rails.application.config.assets.precompile << 'solidus_frontend_manifest.js'