Skip to content

Commit 28a7957

Browse files
committed
docs: make cli commands page paragraphs self-contained
1 parent 9ab62d3 commit 28a7957

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

adminforth/documentation/docs/tutorial/06-CLICommands.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For example: `pnpx adminforth create-app --app-name myadmin --db "sqlite://.db.s
2424
2525
**Description:**
2626

27-
This command scaffolds a brand new AdminForth application in a specified directory. It guides you through setup using command-line arguments or interactive prompts, generates the necessary configuration and project files, installs dependencies, and sets up the development environment.
27+
The `create-app` command scaffolds a brand new AdminForth application in a specified directory. The `create-app` command guides you through setup using command-line arguments or interactive prompts, generates the necessary configuration and project files, installs dependencies, and sets up the development environment.
2828

2929
**Usage:**
3030

@@ -77,7 +77,7 @@ Creates a folder `my-app/` with the entire AdminForth app ready to go.
7777
7878
**Description:**
7979

80-
This command sets up a fresh AdminForth plugin project by generating the required files, installing dependencies, and preparing the environment for local development and testing.
80+
The `create-plugin` command sets up a fresh AdminForth plugin project by generating the required files, installing dependencies, and preparing the environment for local development and testing.
8181

8282
**Usage:**
8383

@@ -124,7 +124,7 @@ Creates a folder with all the necessary files for your plugin and instructions f
124124
125125
**Description:**
126126

127-
This command scans the current working directory for a valid AdminForth instance and automatically generates a TypeScript file containing model type definitions for all defined resources. It inspects the resource columns and maps them to appropriate TypeScript types.
127+
The `generate-models` command scans the current working directory for a valid AdminForth instance and automatically generates a TypeScript file containing model type definitions for all defined resources. The `generate-models` command inspects the resource columns and maps them to appropriate TypeScript types.
128128

129129
**Usage:**
130130

@@ -191,7 +191,7 @@ export type Product = {
191191
192192
**Description:**
193193

194-
This command bundles the AdminForth front-end (SPA) using your current AdminForth instance. It calls the `bundleNow()` method from your AdminForth admin entry point.
194+
The `bundle` command bundles the AdminForth front-end (SPA) using your current AdminForth instance. The `bundle` command calls the `bundleNow()` method from your AdminForth admin entry point.
195195

196196
**Usage:**
197197

@@ -201,7 +201,7 @@ pnpx adminforth bundle
201201

202202
**Output:**
203203

204-
The output files (typically JavaScript/CSS assets) will be generated in the directory configured by your AdminForth project (usually `dist` or `public`).
204+
The `bundle` command generates output files (typically JavaScript/CSS assets) in the directory configured by your AdminForth project (usually `dist` or `public`).
205205

206206

207207

@@ -225,9 +225,9 @@ The output files (typically JavaScript/CSS assets) will be generated in the dire
225225

226226
### `component`
227227

228-
The `component` command is an interactive CLI tool to scaffold and inject Vue components into your AdminForth plugin.
228+
The `component` command is an interactive CLI tool that scaffolds and injects Vue components into your AdminForth plugin.
229229

230-
It helps you generate:
230+
The `component` command helps you generate:
231231
- Custom field components (`fields`)
232232
- CRUD page injections (`crudPage`)
233233
- Login page injections (`login`)
@@ -237,18 +237,18 @@ It helps you generate:
237237

238238
#### 🔤 Custom Fields (`fields`)
239239

240-
Generates components for specific fields in views such as:
240+
The `component fields` flow generates components for specific fields in views such as:
241241
- `list`
242242
- `show`
243243
- `edit`
244244
- `create`
245245
- `filter`
246246

247-
It prompts to select a **resource**, then a **column**, and finally injects a file like:
247+
The `component fields` flow prompts you to select a **resource**, then a **column**, and finally injects a file like:
248248
```bash
249249
custom/UserEmailShow.vue
250250
```
251-
Config will be auto-updated.
251+
The `component fields` flow auto-updates the config.
252252

253253
Usage shortcut:
254254
```bash
@@ -259,15 +259,15 @@ pnpx adminforth component fields.show.user.email
259259

260260
#### ➖ CRUD Page Injections (`crudPage`)
261261

262-
Adds components to entire CRUD pages (not just fields).
262+
The `component crudPage` flow adds components to entire CRUD pages (not just fields).
263263

264-
It supports views:
264+
The `component crudPage` flow supports views:
265265
- `list`
266266
- `show`
267267
- `edit`
268268
- `create`
269269

270-
It then asks:
270+
The `component crudPage` flow then asks:
271271
- Where to inject (top, bottom, dropdown, etc.)
272272
- Optional name (e.g. "ExportButton")
273273
- Whether the component is "thin" (coexists with existing layout)
@@ -279,9 +279,9 @@ custom/OrderShowBottomExportButton.vue
279279

280280
#### 🔐 Login Page Injections (`login`)
281281

282-
Places a component before or after the login form.
282+
The `component login` flow places a component before or after the login form.
283283

284-
It will prompt for:
284+
The `component login` flow prompts for:
285285
- Injection type: `beforeLogin` or `afterLogin`
286286
- Purpose (for naming)
287287
- Updates `index.ts` automatically
@@ -295,13 +295,13 @@ custom/CustomLoginSocials.vue
295295

296296
#### 🌐 Global Injections (`global`)
297297

298-
Injects into:
298+
The `component global` flow injects into:
299299
- `userMenu`
300300
- `header`
301301
- `sidebar`
302302
- `everyPageBottom`
303303

304-
Prompt asks:
304+
The `component global` flow asks for:
305305
- Location
306306
- Description (for naming)
307307

@@ -318,7 +318,7 @@ custom/CustomGlobalSupportLink.vue
318318
- Code uses Handlebars templates (`.vue.hbs`)
319319
- Config file `index.ts` must exist and export `admin`
320320

321-
If the component file already exists, you’ll get a warning and it won’t be overwritten.
321+
If the generated component file already exists, the `component` command shows a warning and does not overwrite the existing file.
322322

323323
---
324324

@@ -344,7 +344,7 @@ If the component file already exists, you’ll get a warning and it won’t be o
344344
345345
**Description:**
346346

347-
This command helps you scaffold a new resource file for a selected table in your database and automatically integrates it into the AdminForth application. It fetches available tables, lets you select one interactively, generates a corresponding resource file using a template, and injects the result into your application’s index file.
347+
The `resource` command helps you scaffold a new resource file for a selected table in your database and automatically integrates it into the AdminForth application. The `resource` command fetches available tables, lets you select one interactively, generates a corresponding resource file using a template, and injects the result into your application’s index file.
348348

349349
**Usage:**
350350

@@ -394,7 +394,7 @@ pnpx adminforth resource
394394
395395
**Description:**
396396

397-
This command outputs a summary of all supported AdminForth commands in the terminal with brief descriptions. It’s useful as a quick reference for developers to understand what functionality is available.
397+
The `help` command outputs a summary of all supported AdminForth commands in the terminal with brief descriptions. The `help` command is useful as a quick reference for developers to understand what functionality is available.
398398

399399
**Usage:**
400400

@@ -414,7 +414,7 @@ Available commands:
414414
resource Scaffold a custom resource
415415
```
416416

417-
This command is typically displayed by running `adminforth` with no arguments or explicitly using `adminforth help`.
417+
The `help` output is typically displayed by running `adminforth` with no arguments or explicitly running `adminforth help`.
418418

419419
---
420420

@@ -443,7 +443,7 @@ This command is typically displayed by running `adminforth` with no arguments or
443443
444444
**Description:**
445445

446-
This command displays the version number of the currently installed AdminForth CLI. It's useful for verifying which version you're using, especially when troubleshooting or checking compatibility.
446+
The `version` command displays the version number of the currently installed AdminForth CLI. The `version` command is useful for verifying which version you are using, especially when troubleshooting or checking compatibility.
447447

448448
**Usage:**
449449

0 commit comments

Comments
 (0)