mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-27 09:45:53 +00:00
Replace shell commands that fail on Windows with Node.js scripts: - mkdir -p / cp -r → scripts/copy-assets.js - rm -rf → scripts/clean.js - Add scripts/ensure-dirs.js for directory creation This resolves "A subdirectory or file -p already exists" errors when running npm scripts on Windows with Git Bash. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
No EOL
364 B
JavaScript
15 lines
No EOL
364 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
function removeRecursive(dirPath) {
|
|
if (fs.existsSync(dirPath)) {
|
|
fs.rmSync(dirPath, { recursive: true, force: true });
|
|
console.log(`Removed: ${dirPath}`);
|
|
}
|
|
}
|
|
|
|
// Clean public and dist directories
|
|
removeRecursive('public');
|
|
removeRecursive('dist');
|
|
|
|
console.log('Clean completed successfully'); |