Skip to content

Instantly share code, notes, and snippets.

@lazzyms
Created July 24, 2018 13:19
Show Gist options
  • Save lazzyms/04081c406ade0f14c99fd323fb363b3e to your computer and use it in GitHub Desktop.
Save lazzyms/04081c406ade0f14c99fd323fb363b3e to your computer and use it in GitHub Desktop.
copy the built project to another folder.
const fs = require('fs-extra')
var del = require("delete");
//delete js
console.log("Deleting Old JS");
del.sync('../electron/main.*.js', {
force: true
});
console.log("Deleted");
// copy files
try {
console.log('Copy started');
fs.copySync('./dist/', '../electron/');
} catch (ex) {
console.log('Error : ' + ex);
} finally {
console.log('Copied');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment