Commit ca0bcc5a authored by Alex Beregszaszi's avatar Alex Beregszaszi

Move editor.getValue from compiler to app

parent b3831e8b
...@@ -518,7 +518,12 @@ var run = function () { ...@@ -518,7 +518,12 @@ var run = function () {
if (compileTimeout) { if (compileTimeout) {
window.clearTimeout(compileTimeout) window.clearTimeout(compileTimeout)
} }
compileTimeout = window.setTimeout(compiler.compile, 300) compileTimeout = window.setTimeout(function () {
var files = {}
files[utils.fileNameFromKey(editor.getCacheFile())] = editor.getValue()
compiler.compile(files)
}, 300)
} }
editor.onChangeSetup(editorOnChange) editor.onChangeSetup(editorOnChange)
......
...@@ -39,12 +39,8 @@ function Compiler (editor, handleImportCall) { ...@@ -39,12 +39,8 @@ function Compiler (editor, handleImportCall) {
}) })
} }
var compile = function () { var compile = function (files) {
self.event.trigger('compilationStarted', []) self.event.trigger('compilationStarted', [])
var input = editor.getValue()
var files = {}
files[utils.fileNameFromKey(editor.getCacheFile())] = input
internalCompile(files) internalCompile(files)
} }
this.compile = compile this.compile = compile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment