@ -518,7 +518,12 @@ var run = function () {
if (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)
@ -39,12 +39,8 @@ function Compiler (editor, handleImportCall) {
})
var compile = function () {
var compile = function (files) {
self.event.trigger('compilationStarted', [])
var input = editor.getValue()
files[utils.fileNameFromKey(editor.getCacheFile())] = input
internalCompile(files)
this.compile = compile