Skip to content

Commit ca26e55

Browse files
Copilotdermatz
andcommitted
Update documentation for static:clean command
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
1 parent 623b29a commit ca26e55

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Please ensure that your Magento installation meets this requirement before insta
3737
| `mageforge:theme:list` | Lists all available themes | `m:t:l` |
3838
| `mageforge:theme:build` | Builds selected themes (CSS/TailwindCSS) | `m:t:b`, `frontend:build` |
3939
| `mageforge:theme:watch` | Starts watch mode for theme development | `m:t:w`, `frontend:watch` |
40+
| `mageforge:static:clean` | Clean var/view_preprocessed and pub/static for a theme | `m:sc:c` |
4041

4142
---
4243

docs/commands.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,35 @@ bin/magento mageforge:theme:watch [--theme=THEME]
8585

8686
---
8787

88-
### 4. SystemCheckCommand (`mageforge:system:check`)
88+
### 4. CleanCommand (`mageforge:static:clean`)
89+
90+
**Purpose**: Cleans var/view_preprocessed and pub/static directories for specific theme.
91+
92+
**File**: `/src/Console/Command/Static/CleanCommand.php`
93+
94+
**Dependencies**:
95+
- `Filesystem` - Magento filesystem component for file operations
96+
- `ThemeList` - Service to retrieve theme information
97+
- `ThemePath` - Service to resolve theme paths
98+
99+
**Usage**:
100+
```bash
101+
bin/magento mageforge:static:clean [<themename>]
102+
```
103+
104+
**Implementation Details**:
105+
- If no theme name is provided, displays available themes
106+
- Validates that the specified theme exists
107+
- Cleans the following directories for the theme:
108+
- `var/view_preprocessed/css/frontend/Vendor/theme`
109+
- `var/view_preprocessed/source/frontend/Vendor/theme`
110+
- `pub/static/frontend/Vendor/theme`
111+
- Displays a summary of cleaned directories
112+
- Returns success status code
113+
114+
---
115+
116+
### 5. SystemCheckCommand (`mageforge:system:check`)
89117

90118
**Purpose**: Displays system information relevant to Magento development.
91119

@@ -111,7 +139,7 @@ bin/magento mageforge:system:check
111139

112140
---
113141

114-
### 5. VersionCommand (`mageforge:version`)
142+
### 6. VersionCommand (`mageforge:version`)
115143

116144
**Purpose**: Displays the current and latest version of the MageForge module.
117145

0 commit comments

Comments
 (0)