mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Merge branch 'master' into dev
This commit is contained in:
commit
eb4f5d6e1b
5 changed files with 16 additions and 8 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
||||||
|
|
||||||
import "@rails/ujs"
|
|
||||||
import "@rails/actioncable"
|
import "@rails/actioncable"
|
||||||
import "controllers"
|
import "controllers"
|
||||||
import "@hotwired/turbo-rails"
|
import "@hotwired/turbo-rails"
|
||||||
|
|
@ -13,5 +12,3 @@ import "./channels"
|
||||||
|
|
||||||
import "trix"
|
import "trix"
|
||||||
import "@rails/actiontext"
|
import "@rails/actiontext"
|
||||||
|
|
||||||
Rails.start()
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ Rails.application.configure do
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = true
|
||||||
|
|
||||||
config.assets.content_type = {
|
config.assets.content_type = {
|
||||||
geojson: 'application/geo+json'
|
geojson: 'application/geo+json'
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
# Pin npm packages by running ./bin/importmap
|
# Pin npm packages by running ./bin/importmap
|
||||||
|
|
||||||
pin_all_from 'app/javascript/channels', under: 'channels'
|
pin_all_from 'app/javascript/channels', under: 'channels'
|
||||||
|
pin_all_from 'app/javascript/maps', under: 'maps'
|
||||||
|
|
||||||
pin 'application', preload: true
|
pin 'application', preload: true
|
||||||
pin '@rails/actioncable', to: 'actioncable.esm.js'
|
pin '@rails/actioncable', to: 'actioncable.esm.js'
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,16 @@
|
||||||
# to asset_path in the _favicon.html.erb partial.
|
# to asset_path in the _favicon.html.erb partial.
|
||||||
|
|
||||||
Rails.application.config.assets.configure do |env|
|
Rails.application.config.assets.configure do |env|
|
||||||
|
mime_type = 'application/manifest+json'
|
||||||
|
extensions = ['.webmanifest']
|
||||||
|
|
||||||
|
if Sprockets::VERSION.to_i >= 4
|
||||||
|
extensions << '.webmanifest.erb'
|
||||||
|
env.register_preprocessor(mime_type, Sprockets::ERBProcessor)
|
||||||
|
end
|
||||||
|
|
||||||
|
env.register_mime_type(mime_type, extensions: extensions)
|
||||||
|
|
||||||
# Register .webmanifest files with the correct MIME type
|
# Register .webmanifest files with the correct MIME type
|
||||||
env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
|
# env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,6 @@ namespace :webmanifest do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hook to automatically generate webmanifest after assets:precompile
|
# Hook to automatically generate webmanifest after assets:precompile
|
||||||
Rake::Task['assets:precompile'].enhance do
|
# Rake::Task['assets:precompile'].enhance do
|
||||||
Rake::Task['webmanifest:generate'].invoke
|
# Rake::Task['webmanifest:generate'].invoke
|
||||||
end
|
# end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue