mirror of
https://github.com/executeautomation/mcp-database-server.git
synced 2025-12-09 21:12:57 +08:00
Added documentation
This commit is contained in:
36
docs/cleanup.js
Normal file
36
docs/cleanup.js
Normal file
@@ -0,0 +1,36 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const directoriesToRemove = [
|
||||
'./docs/local-setup',
|
||||
'./docs/playwright-web',
|
||||
'./docs/playwright-api',
|
||||
'./docs/testing-videos',
|
||||
];
|
||||
|
||||
// Function to delete a directory recursively
|
||||
function deleteFolderRecursive(directoryPath) {
|
||||
if (fs.existsSync(directoryPath)) {
|
||||
fs.readdirSync(directoryPath).forEach((file) => {
|
||||
const curPath = path.join(directoryPath, file);
|
||||
if (fs.lstatSync(curPath).isDirectory()) {
|
||||
deleteFolderRecursive(curPath);
|
||||
} else {
|
||||
fs.unlinkSync(curPath);
|
||||
}
|
||||
});
|
||||
fs.rmdirSync(directoryPath);
|
||||
console.log(`Removed directory: ${directoryPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete each directory
|
||||
directoriesToRemove.forEach((directory) => {
|
||||
try {
|
||||
deleteFolderRecursive(directory);
|
||||
} catch (error) {
|
||||
console.error(`Error deleting ${directory}:`, error);
|
||||
}
|
||||
});
|
||||
|
||||
console.log('Cleanup completed!');
|
||||
Reference in New Issue
Block a user