Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
FIX: move sprockets customization to monkeypatch
Dieser Commit ist enthalten in:
Ursprung
eb5e2fe604
Commit
a1e8070062
1 geänderte Dateien mit 11 neuen und 10 gelöschten Zeilen
|
@ -35,8 +35,8 @@ if respond_to?(:register_svg_icon)
|
||||||
register_svg_icon "save"
|
register_svg_icon "save"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class ::Sprockets::DirectiveProcessor
|
||||||
add_to_class(::Sprockets::DirectiveProcessor, :process_require_tree_discourse_directive) do |path = "."|
|
def process_require_tree_discourse_directive(path = ".")
|
||||||
raise CustomWizard::SprocketsEmptyPath, "path cannot be empty" if path == "."
|
raise CustomWizard::SprocketsEmptyPath, "path cannot be empty" if path == "."
|
||||||
|
|
||||||
discourse_asset_path = "#{Rails.root}/app/assets/javascripts/"
|
discourse_asset_path = "#{Rails.root}/app/assets/javascripts/"
|
||||||
|
@ -48,6 +48,7 @@ add_to_class(::Sprockets::DirectiveProcessor, :process_require_tree_discourse_di
|
||||||
else
|
else
|
||||||
raise CustomWizard::SprocketsFileNotFound, "#{path} not found in discourse core"
|
raise CustomWizard::SprocketsFileNotFound, "#{path} not found in discourse core"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
after_initialize do
|
after_initialize do
|
||||||
|
|
Laden …
In neuem Issue referenzieren