Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decaffeinate lib/misc #758

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix dynamic requires
aminya committed Jun 8, 2020
commit 28b90c959d047569298da829cd48de8ed7caa9e3
26 changes: 18 additions & 8 deletions lib/misc.js
Original file line number Diff line number Diff line change
@@ -2,15 +2,25 @@
// TODO use underscore
import { debounce } from 'underscore-plus';

// TODO use babel to export ... from ...
import * as paths from './misc/paths'
import * as blocks from './misc/blocks'
import * as cells from './misc/cells'
import * as words from './misc/words'
import * as weave from './misc/weave'
import * as colors from './misc/colors'
import * as scopes from './misc/scopes'

export default {
// TODO Fix all of these dynamic requires and circular dependencies
paths: require('./misc/paths'),
blocks: require('./misc/blocks'),
cells: require('./misc/cells'),
words: require('./misc/words'),
weave: require('./misc/weave'),
colors: require('./misc/colors'),
scopes: require('./misc/scopes'),
// TODO remove these from the export default and export them directly (prevents expensive copy)
// TODO don't use this.message use message directly (prevents expensive copy)
paths: paths,
blocks: blocks,
cells: cells,
words: words,
weave: weave,
colors: colors,
scopes: scopes,

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