Skip to content

Commit 283481e

Browse files
committed
fix dynamic requires
1 parent c34ecf1 commit 283481e

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

lib/ui.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
'use babel'
22
import { CompositeDisposable, Disposable } from 'atom';
33

4+
// TODO use babel to export ... from ...
5+
import notifications from './ui/notifications'
6+
import * as selector from './ui/selector'
7+
import views from './ui/views'
8+
import progress from './ui/progress'
9+
import * as layout from './ui/layout'
10+
import * as docpane from './ui/docs'
11+
import * as focusutils from './ui/focusutils'
12+
import * as cellhighlighter from './ui/cellhighlighter'
13+
414
export default {
5-
// TODO Fix all of these dynamic requires and circular dependencies
6-
notifications: require('./ui/notifications'),
7-
selector: require('./ui/selector'),
8-
views: require('./ui/views'),
9-
progress: require('./ui/progress'),
10-
layout: require('./ui/layout'),
11-
docpane: require('./ui/docs'),
12-
focusutils: require('./ui/focusutils'),
13-
cellhighlighter: require('./ui/cellhighlighter'),
15+
// TODO remove these from the export default and export them directly (prevents expensive copy)
16+
// TODO don't use this.message use message directly (prevents expensive copy)
17+
notifications: notifications,
18+
selector: selector,
19+
views: views,
20+
progress: progress,
21+
layout: layout,
22+
docpane: docpane,
23+
focusutils: focusutils,
24+
cellhighlighter: cellhighlighter,
1425

1526
activate(client) {
1627
this.client = client;

0 commit comments

Comments
 (0)