smart_process
Detects minified code, beautifies it for editing, applies changes, then re-minifies. Edit minified JavaScript and CSS without losing formatting.
Instructions
Smart workflow: auto-detect if minified, beautify if needed, process, and optionally re-minify. Perfect for editing minified files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to process | |
| action | No | Action to perform: 'read' returns beautified code, 'edit' applies modifications, 'write' returns minified result | read |
| file_type | Yes | Type of code (js or css) | |
| indent_size | No | Number of spaces for indentation when beautifying | |
| modifications | No | JSON string describing modifications to apply (for 'edit' action). Format: [{"find": "text", "replace": "new_text"}] |