Save file contents periodically

And don't rely on the auto-compile feature to do so.
pull/1/head
Alex Beregszaszi 8 years ago
parent ec1ab03289
commit 751f109fbf
  1. 5
      src/app.js
  2. 1
      src/app/compiler.js

@ -455,10 +455,13 @@ var run = function () {
function editorOnChange () {
var input = editor.getValue()
// save contents
editor.setCacheFileContent(input)
if (input === '') {
editor.setCacheFileContent('')
return
}
if (input === previousInput) {
return
}

@ -41,7 +41,6 @@ function Compiler (editor, handleGithubCall) {
editor.clearAnnotations()
self.event.trigger('compilationStarted', [])
var input = editor.getValue()
editor.setCacheFileContent(input)
var files = {}
files[utils.fileNameFromKey(editor.getCacheFile())] = input

Loading…
Cancel
Save