@oamm/textor 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/dist/bin/textor.js +668 -434
- package/dist/bin/textor.js.map +1 -1
- package/dist/index.cjs +646 -384
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +644 -385
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,6 +193,41 @@ Move and rename sections safely. Textor performs **deep renaming**: if the featu
|
|
|
193
193
|
pnpm textor move-section /old /new
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
+
### rename
|
|
197
|
+
Rename a route, feature, or component. Ideal for correcting typos. Supports **deep renaming** and optional repo-wide import updates.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Rename a route (URL)
|
|
201
|
+
pnpm textor rename route /lgoin /login
|
|
202
|
+
|
|
203
|
+
# Rename a feature module (includes internal files and component names)
|
|
204
|
+
pnpm textor rename feature auth/lgoin auth/login
|
|
205
|
+
|
|
206
|
+
# Rename a shared component
|
|
207
|
+
pnpm textor rename component Header SiteHeader
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Use `--scan` to update imports across the entire project.
|
|
211
|
+
|
|
212
|
+
### add
|
|
213
|
+
Add a new sub-item (api, hook, test, etc.) to an existing feature or component. This command is additive and will not overwrite existing files unless `--force` is used.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Add API to an existing feature
|
|
217
|
+
pnpm textor add api auth/login
|
|
218
|
+
|
|
219
|
+
# Add hooks to an existing component
|
|
220
|
+
pnpm textor add hook Button
|
|
221
|
+
|
|
222
|
+
# Add tests and readme to a feature
|
|
223
|
+
pnpm textor add test auth/login
|
|
224
|
+
pnpm textor add readme auth/login
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Textor automatically detects if the target is a feature or a component based on its state.
|
|
228
|
+
|
|
229
|
+
You can also use the original `add-section` or `create-component` commands with the same flags to add items; they now also support additive mode.
|
|
230
|
+
|
|
196
231
|
### remove-section / remove-component
|
|
197
232
|
Safely remove Textor-managed modules.
|
|
198
233
|
|