Skip to content

Commit

Permalink
Only saves changed files before compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoNeves committed May 29, 2016
1 parent 6279da8 commit d78f83e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* jquery still fades in the last chunk even though it's a replay
* should force the view height never to get smaller despite temporary content reduction
* Cmd-D for "don't save" option
* Only write out ink files that have changed for compilation
* (DONE?) Only write out ink files that have changed for compilation
* (VERIFY) Multiple windows - can be flaky? e.g. saving v.s. compiling etc
* (DONE?) Reliability of story reloading - sometimes it fails
* (DONE?) Copies of inklecate left open sometimes
Expand Down
5 changes: 3 additions & 2 deletions app/renderer/liveCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ function reloadInklecateSession() {
updatedFiles: {}
};

// TODO: Only update the files that have actually changed
project.files.forEach((inkFile) => {
compileInstruction.updatedFiles[inkFile.relativePath()] = inkFile.getValue();
// Add Ink Files with changes to be saved before the next compile
if( inkFile.hasUnsavedChanges )
compileInstruction.updatedFiles[inkFile.relativePath()] = inkFile.getValue();
});

ipc.send("play-ink", compileInstruction, sessionId);
Expand Down

0 comments on commit d78f83e

Please sign in to comment.