Dev: Expose highlight, beautify and createCfg util

This commit is contained in:
surunzi
2017-01-15 11:28:49 +08:00
parent fb7fc34d2f
commit f14c219acc
10 changed files with 44 additions and 30 deletions

View File

@@ -3,7 +3,6 @@ import util from '../lib/util'
import beautify from 'js-beautify'
import highlight from '../lib/highlight.es6'
import JsonViewer from '../lib/JsonViewer.es6'
import config from '../lib/config.es6'
export default class Sources extends Tool
{
@@ -25,7 +24,7 @@ export default class Sources extends Tool
this._parent = parent;
this._bindEvent();
this._initConfig();
this._initCfg();
}
set(type, val)
{
@@ -139,9 +138,9 @@ export default class Sources extends Tool
this._rawTpl = require('./raw.hbs');
this._iframeTpl = require('./iframe.hbs');
}
_initConfig()
_initCfg()
{
let cfg = this.config = config.create('eruda-sources');
let cfg = this.config = util.createCfg('sources');
cfg.set(util.defaults(cfg.get(), {
'showLineNum': true,