summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/stores/extend.js
blob: b2777ec89ffe31ae23fccb605de2bbc0c97cfd20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
};