summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/extend.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/stores/extend.js')
-rw-r--r--app/assets/javascripts/ide/stores/extend.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/extend.js b/app/assets/javascripts/ide/stores/extend.js
new file mode 100644
index 00000000000..1c1636cf6ca
--- /dev/null
+++ b/app/assets/javascripts/ide/stores/extend.js
@@ -0,0 +1,14 @@
+import terminal from './plugins/terminal';
+import terminalSync from './plugins/terminal_sync';
+
+const plugins = () => [
+ terminal,
+ ...(gon.features && gon.features.buildServiceProxy ? [terminalSync] : []),
+];
+
+export default (store, el) => {
+ // plugins is actually an array of plugin factories, so we have to create first then call
+ plugins().forEach(plugin => plugin(el)(store));
+
+ return store;
+};