Skip to content

Commit

Permalink
Fix dynamic requires
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 8, 2020
1 parent 32f1283 commit ea3ec51
Showing 1 changed file with 35 additions and 17 deletions.
52 changes: 35 additions & 17 deletions lib/runtime.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
'use babel'
import { CompositeDisposable, Disposable } from 'atom';

// TODO Fix all of these dynamic requires and circular dependencies
// TODO use babel to export ... from ...
import modules from './runtime/modules'
import * as environments from './runtime/environments'
import evaluation from './runtime/evaluation'
import * as console from './runtime/console'
import completions from './runtime/completions'
import workspace from './runtime/workspace'
import plots from './runtime/plots'
import * as frontend from './runtime/frontend'
import * as debug from './runtime/debugger'
import * as profiler from './runtime/profiler'
import * as outline from './runtime/outline'
import * as linter from './runtime/linter'
import * as packages from './runtime/packages'
import debuginfo from './runtime/debuginfo'
import * as formatter from './runtime/formatter'
import goto from './runtime/goto'

export default {
modules: require('./runtime/modules'),
environments: require('./runtime/environments'),
evaluation: require('./runtime/evaluation'),
console: require('./runtime/console'),
completions: require('./runtime/completions'),
workspace: require('./runtime/workspace'),
plots: require('./runtime/plots'),
frontend: require('./runtime/frontend'),
debugger: require('./runtime/debugger'),
profiler: require('./runtime/profiler'),
outline: require('./runtime/outline'),
linter: require('./runtime/linter'),
packages: require('./runtime/packages'),
debuginfo: require('./runtime/debuginfo'),
formatter: require('./runtime/formatter'),
goto: require('./runtime/goto'),
// 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)
modules: modules,
environments: environments,
evaluation: evaluation,
console: console,
completions: completions,
workspace: workspace,
plots: plots,
frontend: frontend,
debugger: debug,
profiler: profiler,
outline: outline,
linter: linter,
packages: packages,
debuginfo: debuginfo,
formatter: formatter,
goto: goto,

activate() {
this.subs = new CompositeDisposable();
Expand Down

0 comments on commit ea3ec51

Please sign in to comment.