<commit_before>import * as logging from './core/log'
import * as charts  from './charts/core'
import * as factory from './models/items/factory'
import * as app     from './app/app'
import GraphiteChartRenderer    from './charts/graphite'
import FlotChartRenderer        from './charts/flot'
import PlaceholderChartRenderer from './charts/placeholder'
import manager from './app/manager'
import Config  from './app/config'

declare var window, $, tessera

var log = logging.logger('main')

// Temporary, for compatibility with old templates
window.ts.app = app
window.ts.manager = manager
window.ts.templates = tessera.templates
window.ts.charts = charts
window.ts.factory = factory
app.config = window.ts.config

function setup(config: Config) {
  log.info('Registering chart renderers')
  charts.renderers.register(new GraphiteChartRenderer({
    graphite_url: config.GRAPHITE_URL
  }))
  charts.renderers.register(new FlotChartRenderer())
  charts.renderers.register(new PlaceholderChartRenderer())
  log.info('Done.')
}

setup(app.config)<commit_msg>expose more modules globally, for debugging<commit_after>import * as logging from './core/log'
import * as charts  from './charts/core'
import * as factory from './models/items/factory'
import * as app     from './app/app'
import * as edit    from './edit/edit'
import { actions } from './core/action'
import GraphiteChartRenderer    from './charts/graphite'
import FlotChartRenderer        from './charts/flot'
import PlaceholderChartRenderer from './charts/placeholder'
import manager from './app/manager'
import Config  from './app/config'

declare var window, $, tessera

var log = logging.logger('main')

// Temporary, for compatibility with old templates
window.ts.app = app
window.ts.manager = manager
window.ts.templates = tessera.templates
window.ts.charts = charts
window.ts.factory = factory
window.ts.actions = actions
window.ts.edit = edit
app.config = window.ts.config

function setup(config: Config) {
  log.info('Registering chart renderers')
  charts.renderers.register(new GraphiteChartRenderer({
    graphite_url: config.GRAPHITE_URL
  }))
  charts.renderers.register(new FlotChartRenderer())
  charts.renderers.register(new PlaceholderChartRenderer())
  log.info('Done.')
}

setup(app.config)
{'fraction_non_alphanumeric': 0.12008830022075055, 'fraction_numerical': 0.0, 'mean_word_length': 4.460240963855422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5582878', 'n_tokens_mistral': 671, 'n_tokens_neox': 653, 'n_words': 179}