30 lines
861 B
JavaScript
30 lines
861 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
function copyRecursive(src, dst) {
|
|
if (!fs.existsSync(dst)) {
|
|
fs.mkdirSync(dst, { recursive: true });
|
|
}
|
|
fs.readdirSync(src).forEach(f => {
|
|
const srcPath = path.join(src, f);
|
|
const dstPath = path.join(dst, f);
|
|
if (fs.statSync(srcPath).isDirectory()) {
|
|
copyRecursive(srcPath, dstPath);
|
|
} else {
|
|
fs.copyFileSync(srcPath, dstPath);
|
|
}
|
|
});
|
|
}
|
|
|
|
// Copy original extension files
|
|
copyRecursive(
|
|
'D:/temp/破解/cursorpro-0.4.5/原版本/extension/out',
|
|
'D:/temp/破解/cursorpro-0.4.5/extension/out'
|
|
);
|
|
|
|
console.log('Files copied from original extension');
|
|
|
|
// Now we need to write our clean client.js
|
|
// The clean version is already saved earlier
|
|
console.log('Note: client.js should be replaced with clean version');
|