wizard-plugin.js.erb 466 B

1234567891011121314151617
  1. // loads files for plugins that have been added via CustomWizard::Field
  2. <%
  3. Discourse.unofficial_plugins.each do |plugin|
  4. plugin_name = plugin.metadata.name
  5. if require_plugin_assets = CustomWizard::Field.require_assets[plugin_name]
  6. plugin.each_globbed_asset do |f, is_dir|
  7. if require_plugin_assets.any? { |dir| f.include?(dir) }
  8. if is_dir
  9. depend_on(f)
  10. else
  11. require_asset(f)
  12. end
  13. end
  14. end
  15. end
  16. end
  17. %>