Initial commit
This commit is contained in:
74
commands/webflow-clean.md
Normal file
74
commands/webflow-clean.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
description: Remove all generated files from Webflow conversion
|
||||
argument-hint: [--force to skip confirmation]
|
||||
allowed-tools: Bash, Read, Glob
|
||||
---
|
||||
|
||||
Remove all generated files from the Webflow conversion process.
|
||||
|
||||
**Warning**: This will delete generated files. Original CSV and HTML files will NOT be deleted.
|
||||
|
||||
## Files to Remove
|
||||
|
||||
### Generated Files (will be deleted):
|
||||
- `data/` directory and all JSON files
|
||||
- `scripts/csv-to-json.py`
|
||||
- `js/cms-loader.js`
|
||||
- `README.md` (if generated by plugin)
|
||||
|
||||
### Original Files (will be preserved):
|
||||
- All `.csv` files
|
||||
- All `.html` files
|
||||
- All `.css`, `.js` (original), images, fonts, etc.
|
||||
|
||||
## Cleanup Process
|
||||
|
||||
### 1. Confirmation
|
||||
If `$ARGUMENTS` does not contain `--force`:
|
||||
```
|
||||
⚠️ Warning: This will delete all generated files
|
||||
|
||||
Files to be deleted:
|
||||
- data/ (X JSON files)
|
||||
- scripts/csv-to-json.py
|
||||
- js/cms-loader.js
|
||||
- README.md
|
||||
|
||||
Original CSV and HTML files will be preserved.
|
||||
|
||||
Continue? (y/n)
|
||||
```
|
||||
|
||||
### 2. Execute Cleanup
|
||||
If confirmed or `--force` flag present:
|
||||
```bash
|
||||
rm -rf data/
|
||||
rm -f scripts/csv-to-json.py
|
||||
rm -f js/cms-loader.js
|
||||
rm -f README.md
|
||||
```
|
||||
|
||||
Note: Only removes these specific files, not entire directories.
|
||||
|
||||
### 3. Report Results
|
||||
```
|
||||
🧹 Cleanup Complete
|
||||
|
||||
✅ Removed:
|
||||
- data/ directory
|
||||
- CSV converter script
|
||||
- CMS loader script
|
||||
- Generated documentation
|
||||
|
||||
📁 Preserved:
|
||||
- All original CSV files
|
||||
- All original HTML files
|
||||
- All other assets
|
||||
|
||||
🚀 To reconvert: Run '/webflow-convert'
|
||||
```
|
||||
|
||||
### 4. Optional: Remove Empty Directories
|
||||
Ask user if they want to remove `data/` and `scripts/` directories if they're now empty.
|
||||
|
||||
**Safety Note**: This command only removes files that the plugin generates. Your original Webflow export is safe.
|
||||
Reference in New Issue
Block a user