Skip to content

Commit e3124a5

Browse files
DevExtreme Schematics: Update Readme (#1002)
* DevExtreme Schematics: Update Readme * Update migrate-config-components Readme * Revise migrate-config-components Readme * Clarify component types * Minor update * Apply suggestions from code review Co-authored-by: Vladimir Abadzhev <[email protected]> * Update devextreme-schematics/readme.md * Update migrate-config-components/readme.md --------- Co-authored-by: Vladimir Abadzhev <[email protected]>
1 parent b272e35 commit e3124a5

File tree

2 files changed

+29
-41
lines changed

2 files changed

+29
-41
lines changed
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# DevExtreme Schematics
2-
DevExtreme schematics are workflow tools you can use in an Angular application created with [DevExtreme CLI](https://github.com/devexpress/DevExtreme-CLI) to add DevExtreme libraries or views and perform other DevExtreme-related tasks. Read [this article](https://blog.angular.io/schematics-an-introduction-dc1dfbc2a2b2) for more information on Angular Schematics.
2+
DevExtreme Schematics are Angular workflow tools for applications created with [DevExtreme CLI](https://github.com/devexpress/DevExtreme-CLI). You can use these tools to add application views and layouts to your apps or to perform other tasks related to DevExtreme and the DevExtreme [Angular Application Template](https://devexpress.github.io/devextreme-angular-template). For more information on Angular Schematics, refer to the following topic: [Introduction to Angular Schematics](https://blog.angular.io/schematics-an-introduction-dc1dfbc2a2b2).
33

44
## Included Schematics
55

66
This package includes the following schematics:
77

88
- [install](src/install)
9-
Adds DevExtreme to an Angular application
9+
Adds DevExtreme to an Angular application.
1010

1111
- [add-layout](src/add-layout)
12-
Adds a DevExtreme layout to a DevExtreme Angular application
12+
Adds a DevExtreme layout to an Angular application.
1313

1414
- [add-app-template](src/add-app-template)
15-
Adds a DevExtreme layout template to an Angular application
15+
Adds a DevExtreme app template to an Angular application.
1616

1717
- [add-sample-views](src/add-sample-views)
18-
Adds sample views to a DevExtreme Angular application
18+
Adds sample views to an Angular application.
1919

2020
- [add-view](src/add-view)
21-
Adds a view to a DevExtreme Angular application
21+
Adds a view to an Angular application.
2222

2323
## TypeScript Dependency & Global CLI Usage
2424

@@ -28,21 +28,22 @@ Some DevExtreme migration schematics require TypeScript to process inline Angula
2828
- Your project's node_modules
2929
- The global node_modules
3030

31-
If TypeScript is not found, inline template migration will be skipped and a warning will be shown with resolution attempts and errors.
31+
If the CLI fails to find TypeScript, it skips inline template migration and displays a warning message that contains resolution attempts and errors.
3232

33-
### How to Fix TypeScript Not Available
33+
### How to Install TypeScript
3434

35-
1. **Local Project:** Install TypeScript in your project root:
35+
1. **Local Project:** To install TypeScript in a project, run the following command:
3636
```sh
3737
npm install typescript --save-dev
3838
```
39-
2. **Global CLI:** If you use the CLI globally, also install TypeScript globally:
39+
2. **Global CLI:** To install TypeScript globally on your machine, run the following command:
4040
```sh
4141
npm install -g typescript
4242
```
43-
3. **npx Usage:** If you use npx, ensure TypeScript is available in your workspace or globally.
44-
4. **Troubleshooting:**
45-
- Some npm global installs may not link dependencies as expected. If you see repeated TypeScript resolution errors, try running the CLI from a project where TypeScript is installed locally.
43+
44+
**Troubleshooting**
45+
46+
- Some npm global installs may not link dependencies as expected. If you experience repeated TypeScript resolution errors, try running CLI commands from a project where TypeScript is installed locally.
4647
- You can also manually link TypeScript to your global node_modules if needed.
4748

48-
If you continue to see errors, review the warning output for resolution attempts and check your npm/node installation paths.
49+
If errors persist, review resolution attempt information in the warning output and check your npm/node installation paths.
Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
# migrate-config-components
22

3-
A schematic that migrates deprecated nested DevExtreme components to the new config-based structure.
3+
A schematic that migrates generic DevExtreme configuration components.
44

55
## Description
66

7-
This schematic automatically migrates your Angular application to use the latest DevExtreme component structure by replacing deprecated nested components (such as `<dxi-column>`) with their new config-based equivalents (such as `<dxi-data-grid-column>`). The migration command is available as a top-level DevExtreme CLI command and can be run from any directory.
7+
This schematic automatically migrates generic configuration components to named configuration components in your DevExtreme-powered Angular app. The migration command is available as a top-level DevExtreme CLI command that you can run from any directory.
88

99
## Usage
1010

1111
### Via DevExtreme CLI (Recommended)
1212

13-
The migration command can be run from any directory and will work both inside and outside Angular workspaces:
13+
You can run the migration command from any directory, including both inside and outside Angular workspaces:
1414

1515
```bash
1616
devextreme migrate angular-config-components
1717
```
1818

19-
### Options (All Optional)
19+
### Parameters (All Optional)
2020

2121
- `--include`: Glob patterns of template files to include (default: `**/*.html`). Separate multiple patterns with commas.
22-
- `--script-include`: Glob patterns for TypeScript/JavaScript files to scan for inline `@Component({ template })` (default: `**/*.ts,**/*.js`). Set to empty to disable.
23-
- `--dry`: Run in dry mode to preview changes without applying them (default: `false`)
22+
- `--script-include`: Glob patterns for TypeScript/JavaScript files to scan for inline templates (default: `**/*.ts,**/*.js`). Pass an empty value ('' or []) to disable.
23+
- `--dry`: Run in dry mode to preview changes without applying them (default: `false`).
2424

2525
### Examples
2626

2727
```bash
28-
# Migrate all HTML templates and inline templates (using defaults)
28+
# Migrate all HTML templates and inline templates (default configuration)
2929
devextreme migrate angular-config-components
3030

3131
# Migrate only specific files
@@ -43,45 +43,32 @@ devextreme migrate angular-config-components --include="*.html,*.ts" --dry
4343

4444
### Via Angular CLI
4545

46-
Alternatively, you can run the schematic directly with Angular CLI:
46+
You can also use the Angular CLI to run the schematic:
4747

4848
```bash
4949
ng g devextreme-schematics:migrate-config-components
5050
```
5151

52-
## What it does
52+
## Sample results
5353

54-
This schematic automatically updates your templates to replace deprecated nested components with the new config-based component structure. For example:
55-
56-
**Before (deprecated nested):**
54+
**Generic configuration components:**
5755
```html
5856
<dx-data-grid>
5957
<dxi-column field="name"></dxi-column>
6058
<dxi-column field="age"></dxi-column>
6159
</dx-data-grid>
6260
```
6361

64-
**After (config-based):**
62+
**Named configuration components:**
6563
```html
6664
<dx-data-grid>
6765
<dxi-data-grid-column field="name"></dxi-data-grid-column>
6866
<dxi-data-grid-column field="age"></dxi-data-grid-column>
6967
</dx-data-grid>
7068
```
7169

72-
### Why migrate?
73-
74-
DevExtreme Angular components are moving from a nested structure (e.g., `<dxi-column>`) to a config-based structure (e.g., `<dxi-data-grid-column>`) for improved clarity, maintainability, and future compatibility. This schematic automates the migration process to help you keep your codebase up to date with the latest DevExtreme standards.
75-
7670
## Requirements
7771

78-
- Node.js and npm/yarn installed
79-
- Angular application with DevExtreme components (when running inside a workspace)
80-
- DevExtreme Angular version that supports the new component structure
81-
82-
## Notes
83-
84-
- The command can be run from any directory, not just Angular workspaces
85-
- When run outside an Angular workspace, the underlying Angular CLI will show appropriate error messages
86-
- All options are optional and have sensible defaults
87-
- The command uses the latest version of `devextreme-schematics` automatically
72+
- Node.js and npm or yarn.
73+
- Angular application with DevExtreme components.
74+
- DevExtreme Angular version that supports named configuration components.

0 commit comments

Comments
 (0)