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 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-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-22 15:06:19 +02:00
|
|
|
import '../shared/autocomplete';
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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;
|