Skip to content

Commit

Permalink
Added DB backup and quick set buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Oct 12, 2017
1 parent e64a082 commit 4aaaaea
Show file tree
Hide file tree
Showing 7 changed files with 649 additions and 264 deletions.
6 changes: 5 additions & 1 deletion dump.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var SQLite3 = require('better-sqlite3');
var rootDir = '../phaser/v3/src/';
var outputJSON = './percy/files.json';

// Back-up the DB
fs.renameSync('./percy/files.db', './percy/files-backup.db');

// Create a new one
var db = new SQLite3('./percy/files.db');

db.exec(`
Expand Down Expand Up @@ -48,7 +52,7 @@ fs.writeFile(outputJSON, filteredTree, function (error) {

db.transaction(queries).run();

console.log('Complete');
console.log('Complete. Now run \'sync\'');

db.close();
}
Expand Down
Binary file added percy/files-backup.db
Binary file not shown.
Binary file modified percy/files.db
Binary file not shown.
Loading

0 comments on commit 4aaaaea

Please sign in to comment.