<%

# Use local copy of jquery for development.
# see also: /app/views/layouts/application.html.erb
if Rails.env.development?
  require_asset("lodash/lodash")
  require_asset("jquery/jquery")
  require_asset("core.js/core.js")
end

# Our dependencies and load priority sorted in this file.
require_asset("main_include")

%>

/* Initialize application after all components loaded. *
 * see also: /app/assets/javascripts/shreds/main.es6   */
window.shreds = {
  root_path: '<%= ActionController::Base.relative_url_root || '/' %>'
};
var debugmode = <%= Rails.env.development? %>;
$(function () { require('shreds/main').init(debugmode); });

<%

# Use local copy of jquery for development.
# see also: /app/views/layouts/application.html.erb
if Rails.env.development?
  require_asset("lodash/lodash")
  require_asset("jquery/jquery")
  require_asset("core.js/core.js")
end

# Our dependencies and load priority sorted in this file.
require_asset("main_include")

%>

/* Initialize application after all components loaded. *
 * see also: /app/assets/javascripts/shreds/main.es6   */
window.shreds = {
  root_path: '<%= ActionController::Base.relative_url_root || '/' %>'
};

window.MessageBus.baseUrl = (window.shreds.root_path + '/').replace(/\/{2,}/g, '/');

var debugmode = <%= Rails.env.development? %>;
$(function () { require('shreds/main').init(debugmode); });

Set message_bus base URL according to shreds relative root
Set message_bus base URL according to shreds relative root
