2018-07-12 11:50:47 +02:00
|
|
|
import Turbolinks from 'turbolinks';
|
|
|
|
import Rails from 'rails-ujs';
|
2018-08-02 15:49:14 +02:00
|
|
|
import ActiveStorage from '../shared/activestorage/ujs';
|
2018-07-12 11:50:47 +02:00
|
|
|
import Bloodhound from 'bloodhound-js';
|
|
|
|
import jQuery from 'jquery';
|
|
|
|
|
2018-08-06 15:49:12 +02:00
|
|
|
// Include runtime-polyfills for older browsers.
|
|
|
|
// Due to .babelrc's 'useBuiltIns', only polyfills actually
|
|
|
|
// required by the browsers we support will be included.
|
|
|
|
import 'babel-polyfill';
|
|
|
|
|
2018-07-12 11:50:47 +02:00
|
|
|
import 'typeahead.js';
|
|
|
|
|
2018-08-09 16:45:56 +02:00
|
|
|
import '../shared/sentry';
|
2018-07-12 11:50:47 +02:00
|
|
|
import '../shared/rails-ujs-fix';
|
2018-08-08 17:18:02 +02:00
|
|
|
import '../shared/champs/address';
|
2018-07-12 11:50:47 +02:00
|
|
|
|
|
|
|
// Start Rails helpers
|
|
|
|
Rails.start();
|
|
|
|
Turbolinks.start();
|
|
|
|
ActiveStorage.start();
|
|
|
|
|
2018-08-01 11:39:47 +02:00
|
|
|
// Disable jQuery-driven animations during tests
|
|
|
|
if (process.env['RAILS_ENV'] === 'test') {
|
|
|
|
jQuery.fx.off = true;
|
|
|
|
}
|
|
|
|
|
2018-07-12 11:50:47 +02:00
|
|
|
// Expose globals
|
|
|
|
window.Bloodhound = Bloodhound;
|
2018-08-01 11:39:47 +02:00
|
|
|
// Export jQuery globally for legacy Javascript files used in the old design
|
2018-08-09 11:53:59 +02:00
|
|
|
jQuery.rails = Rails;
|
2018-07-12 11:50:47 +02:00
|
|
|
window.$ = jQuery;
|
|
|
|
window.jQuery = jQuery;
|