about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-07-14 10:56:41 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-07-14 03:56:41 +0200
commite9b322d0a6bebe7d13a53a216482ecc364f18806 (patch)
treeb775933f5fce4df3c563d45c1e675189b6444dd2 /app/javascript
parente7091074636c519a5c0bd52c8ef85fa3c5df4656 (diff)
Upgrade webpack to version v4.x (#6655)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/common.js8
-rw-r--r--app/javascript/packs/about.js3
-rw-r--r--app/javascript/packs/admin.js3
-rw-r--r--app/javascript/packs/application.js3
-rw-r--r--app/javascript/packs/common.js6
-rw-r--r--app/javascript/packs/public.js3
-rw-r--r--app/javascript/packs/share.js3
7 files changed, 23 insertions, 6 deletions
diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js
new file mode 100644
index 000000000..2b10b8c30
--- /dev/null
+++ b/app/javascript/mastodon/common.js
@@ -0,0 +1,8 @@
+import Rails from 'rails-ujs';
+
+export function start() {
+  require('font-awesome/css/font-awesome.css');
+  require.context('../images/', true);
+
+  Rails.start();
+};
diff --git a/app/javascript/packs/about.js b/app/javascript/packs/about.js
index 63e12da42..843cb2c87 100644
--- a/app/javascript/packs/about.js
+++ b/app/javascript/packs/about.js
@@ -1,4 +1,7 @@
 import loadPolyfills from '../mastodon/load_polyfills';
+import { start } from '../mastodon/common';
+
+start();
 
 function loaded() {
   const TimelineContainer = require('../mastodon/containers/timeline_container').default;
diff --git a/app/javascript/packs/admin.js b/app/javascript/packs/admin.js
index 5dbcc03d3..b151b4af0 100644
--- a/app/javascript/packs/admin.js
+++ b/app/javascript/packs/admin.js
@@ -1,4 +1,7 @@
 import { delegate } from 'rails-ujs';
+import { start } from '../mastodon/common';
+
+start();
 
 function handleDeleteStatus(event) {
   const [data] = event.detail;
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index 116632dea..c65ebed74 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -1,4 +1,7 @@
 import loadPolyfills from '../mastodon/load_polyfills';
+import { start } from '../mastodon/common';
+
+start();
 
 loadPolyfills().then(() => {
   require('../mastodon/main').default();
diff --git a/app/javascript/packs/common.js b/app/javascript/packs/common.js
deleted file mode 100644
index 96e6f4b16..000000000
--- a/app/javascript/packs/common.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { start } from 'rails-ujs';
-import 'font-awesome/css/font-awesome.css';
-
-require.context('../images/', true);
-
-start();
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index cc2fed3f1..4b1e87ae3 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -1,5 +1,8 @@
 import loadPolyfills from '../mastodon/load_polyfills';
 import ready from '../mastodon/ready';
+import { start } from '../mastodon/common';
+
+start();
 
 window.addEventListener('message', e => {
   const data = e.data || {};
diff --git a/app/javascript/packs/share.js b/app/javascript/packs/share.js
index e9580f648..4ef23e1b2 100644
--- a/app/javascript/packs/share.js
+++ b/app/javascript/packs/share.js
@@ -1,4 +1,7 @@
 import loadPolyfills from '../mastodon/load_polyfills';
+import { start } from '../mastodon/common';
+
+start();
 
 function loaded() {
   const ComposeContainer = require('../mastodon/containers/compose_container').default;