Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
mv(tempPawJSBuildPath, directories.dist, { clobber: true }, (err1) => {
if (err1) {
// eslint-disable-next-line
console.error(err1);
return;
}
// eslint-disable-next-line
console.log("Static site generated successfully.");
process.exit(0);
});
});
});
del([tempPawJSBuildPath]).then(() => {
mv(directories.build, tempPawJSBuildPath, { mkdir: true, clobber: true }, (err) => {
if (err) {
// eslint-disable-next-line
console.error(err);
return;
}
del([directories.dist])
.then(() => {
mv(tempPawJSBuildPath, directories.dist, { clobber: true }, (err1) => {
if (err1) {
// eslint-disable-next-line
console.error(err1);
return;
}
// eslint-disable-next-line
console.log("Static site generated successfully.");
process.exit(0);
middleware().then(() => {
console.log(`Move ${tempPath} to ${destination}`)
mv(tempPath, destination, err => err ? reject(err) : resolve())
})
})
return new Promise((resolve, reject) => {
mv(oldPath, newPath, err => {
if (err) {
reject(err);
return;
}
resolve();
});
});
}
return new Promise((resolve, reject) =>
mv(from, to, err => err ? reject(err) : resolve()))
}
return new Promise((resolve, reject) => {
mvLib(sourcePath, destinationPath, options, error => {
if (error) {
reject(error);
} else {
resolve();
}
});
});
}