Skip to content

Commit 28b90c9

Browse files
committed
fix dynamic requires
1 parent 25bfbf2 commit 28b90c9

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

lib/misc.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22
// TODO use underscore
33
import { debounce } from 'underscore-plus';
44

5+
// TODO use babel to export ... from ...
6+
import * as paths from './misc/paths'
7+
import * as blocks from './misc/blocks'
8+
import * as cells from './misc/cells'
9+
import * as words from './misc/words'
10+
import * as weave from './misc/weave'
11+
import * as colors from './misc/colors'
12+
import * as scopes from './misc/scopes'
13+
514
export default {
6-
// TODO Fix all of these dynamic requires and circular dependencies
7-
paths: require('./misc/paths'),
8-
blocks: require('./misc/blocks'),
9-
cells: require('./misc/cells'),
10-
words: require('./misc/words'),
11-
weave: require('./misc/weave'),
12-
colors: require('./misc/colors'),
13-
scopes: require('./misc/scopes'),
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+
paths: paths,
18+
blocks: blocks,
19+
cells: cells,
20+
words: words,
21+
weave: weave,
22+
colors: colors,
23+
scopes: scopes,
1424

1525
bufferLines(t, f) {
1626
if (!f) { [t, f] = [null, t]; }

0 commit comments

Comments
 (0)