|
2 | 2 |
|
3 | 3 | > **⚠️ Important**: This is a **codemod tool only**. You do NOT need to import or use any library components. Simply install the package and run the codemod to transform your existing PatternFly components. The library code in this repository is for reference/development purposes only. |
4 | 4 |
|
5 | | -**📦 Install from npm**: `npm install -D @patternfly/context-for-ai` |
| 5 | +**📦 Install from npm**: `npm install -D @patternfly/context-for-ai` |
6 | 6 | **🔗 Package**: [@patternfly/context-for-ai on npm](https://www.npmjs.com/package/@patternfly/context-for-ai) |
7 | 7 |
|
8 | 8 | A codemod tool that automatically adds standardized semantic `data-*` attributes to **all PatternFly components** in your codebase, making them AI-friendly and easier for AI tools to understand. |
@@ -188,7 +188,7 @@ npm outdated @patternfly/context-for-ai |
188 | 188 |
|
189 | 189 | ```bash |
190 | 190 | npm update @patternfly/context-for-ai |
191 | | -# or |
| 191 | +# or for latest version |
192 | 192 | npm install -D @patternfly/context-for-ai@latest |
193 | 193 | ``` |
194 | 194 |
|
@@ -224,19 +224,19 @@ Check the commit history or GitHub releases to see what improvements were made i |
224 | 224 | ### Transform Entire Directory |
225 | 225 |
|
226 | 226 | ```bash |
227 | | -jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --extensions=ts,tsx,js,jsx --parser=tsx src/ |
| 227 | +npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --extensions=ts,tsx,js,jsx --parser=tsx src/ |
228 | 228 | ``` |
229 | 229 |
|
230 | 230 | ### Transform Specific File |
231 | 231 |
|
232 | 232 | ```bash |
233 | | -jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js src/components/MyComponent.tsx |
| 233 | +npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js src/components/MyComponent.tsx |
234 | 234 | ``` |
235 | 235 |
|
236 | 236 | ### Preview Changes (Dry Run) |
237 | 237 |
|
238 | 238 | ```bash |
239 | | -jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --dry src/ |
| 239 | +npx jscodeshift -t node_modules/@patternfly/context-for-ai/codemod/transform.js --dry src/ |
240 | 240 | ``` |
241 | 241 |
|
242 | 242 | ### Using the Bash Script |
|
0 commit comments