WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 2164a13

Browse files
authored
Merge pull request #5523 from ag-grid/ajt/fix-nx-command-references-in-prompts
Fix nx command references in prompts.
2 parents d2a6ffa + dc47869 commit 2164a13

File tree

26 files changed

+511
-118
lines changed

26 files changed

+511
-118
lines changed

external/ag-shared/scripts/watch/watch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ function respawnError() {
524524
error(`Repeated respawn detected!
525525
526526
The Nx Daemon maybe erroring, try restarting it to resolve with either:
527-
- \`nx daemon --stop\`
527+
- \`yarn nx daemon --stop\`
528528
- \`yarn\`
529529
530530
Or alternatively view its logs at:

external/ag-website-shared/src/components/docs-examples/components/cell-renderers/ActionsCellRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styles from '../DocsExamples.module.scss';
22

33
const getNxGenerateOneExample = ({ pageName, exampleName }: { pageName: string; exampleName: string }) => {
4-
return `nx run generate-docs-example --page=${pageName} --example=${exampleName}`;
4+
return `yarn nx run generate-docs-example --page=${pageName} --example=${exampleName}`;
55
};
66

77
export function ActionsCellRenderer({ data }) {

external/ag-website-shared/src/utils/runNxGenerateExample.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ type GenerateKind = 'docs' | 'gallery';
99

1010
const getNxGenerateCommand = (kind: GenerateKind, { pageName, exampleName }: RunNxGenerateExampleParams) => {
1111
if (kind === 'docs') {
12-
return `nx run all:generate-docs-example --page=${pageName} --example=${exampleName}`;
12+
return `yarn nx run all:generate-docs-example --page=${pageName} --example=${exampleName}`;
1313
}
1414
// gallery
15-
return `nx run all:generate-gallery-example --example=${exampleName}`;
15+
return `yarn nx run all:generate-gallery-example --example=${exampleName}`;
1616
};
1717

1818
const runNx = (command: string) => {

plugins/ag-charts-generate-chart-thumbnail/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This library was generated with [Nx](https://nx.dev).
44

55
## Building
66

7-
Run `nx build ag-charts-generate-chart-thumbnail` to build the library.
7+
Run `yarn nx build ag-charts-generate-chart-thumbnail` to build the library.
88

99
## Running unit tests
1010

11-
Run `nx test ag-charts-generate-chart-thumbnail` to execute the unit tests via [Jest](https://jestjs.io).
11+
Run `yarn nx test ag-charts-generate-chart-thumbnail` to execute the unit tests via [Jest](https://jestjs.io).

plugins/ag-charts-generate-code-reference-files/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This library was generated with [Nx](https://nx.dev).
44

55
## Building
66

7-
Run `nx build ag-charts-generate-code-reference-files` to build the library.
7+
Run `yarn nx build ag-charts-generate-code-reference-files` to build the library.
88

99
## Running unit tests
1010

11-
Run `nx test ag-charts-generate-code-reference-files` to execute the unit tests via [Jest](https://jestjs.io).
11+
Run `yarn nx test ag-charts-generate-code-reference-files` to execute the unit tests via [Jest](https://jestjs.io).

plugins/ag-charts-generate-example-files/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This library was generated with [Nx](https://nx.dev).
44

55
## Building
66

7-
Run `nx build ag-charts-generate-example-files` to build the library.
7+
Run `yarn nx build ag-charts-generate-example-files` to build the library.
88

99
## Running unit tests
1010

11-
Run `nx test ag-charts-generate-example-files` to execute the unit tests via [Jest](https://jestjs.io).
11+
Run `yarn nx test ag-charts-generate-example-files` to execute the unit tests via [Jest](https://jestjs.io).

plugins/ag-charts-task-autogen/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This library was generated with [Nx](https://nx.dev).
44

55
## Building
66

7-
Run `nx build ag-charts-build-tools` to build the library.
7+
Run `yarn nx build ag-charts-build-tools` to build the library.
88

99
## Running unit tests
1010

11-
Run `nx test ag-charts-build-tools` to execute the unit tests via [Jest](https://jestjs.io).
11+
Run `yarn nx test ag-charts-build-tools` to execute the unit tests via [Jest](https://jestjs.io).

tools/prompts/AGENTS.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ This file provides guidance to AI Agents when working with code in this reposito
77
- **Yarn and Nx based repo:** Use Yarn for package management and Nx for build and test orchestration.
88
- **Main constraint:** Community and enterprise runtime bundles stay dependency-free beyond AG Charts code.
99
- **Default branch:** Target `latest`; follow release/JIRA naming conventions below for topic branches.
10-
- **Build monitoring:** Check `node_modules/.cache/ag-watch-status.json` to monitor watch state (`nx dev`) and build health (see [Development Server Guide](tools/prompts/guides/dev-server.md)).
11-
- **Formatting:** Run `nx format` from the repo root before proposing commits.
12-
- **Typechecking:** Run `nx build:types <package>` from the repo root before proposing commits.
13-
- **Linting:** Run `nx lint <package>` from the repo root before proposing commits.
14-
- **Baseline verification:** Expect to run `nx test ag-charts-community`, `nx test ag-charts-enterprise`, and `nx e2e ag-charts-website` after meaningful chart changes.
10+
- **Build monitoring:** Check `node_modules/.cache/ag-watch-status.json` to monitor watch state (`yarn nx dev`) and build health (see [Development Server Guide](tools/prompts/guides/dev-server.md)).
11+
- **Formatting:** Run `yarn nx format` from the repo root before proposing commits.
12+
- **Typechecking:** Run `yarn nx build:types <package>` from the repo root before proposing commits.
13+
- **Linting:** Run `yarn nx lint <package>` from the repo root before proposing commits.
14+
- **Baseline verification:** Expect to run `yarn nx test ag-charts-community`, `yarn nx test ag-charts-enterprise`, and `yarn nx e2e ag-charts-website` after meaningful chart changes.
1515
- **Test verification patterns:** When writing or modifying tests, review similar tests to ensure consistent verification patterns (see [Testing Guide](tools/prompts/guides/testing.md)).
1616
- **Context docs:** Skim `tools/prompts/technology-stack.md` for stack or architectural decisions before introducing new patterns.
1717

@@ -49,19 +49,19 @@ For detailed information about preferred technologies and architectural constrai
4949

5050
- `yarn install` – install dependencies after cloning or when the Yarn lockfile changes.
5151
- `./tools/install-for-cloud.sh` – install dependencies and tooling in a remote environment - use this in preference to `yarn install` to ensure all global tools are installed.
52-
- `nx clean` – purge all dist folders when switching branches or before packaging releases.
53-
- `nx format` – format repo files; run from the project root before committing.
54-
- `nx build <package>` – compile a specific package after code edits.
55-
- `nx build:types <package>` – regenerate declaration files when touching exported APIs.
56-
- `nx build:package <package>` – create ESM/CJS bundles to validate publishable output.
57-
- `nx build:umd <package>` – produce UMD bundles for browser distribution smoke-tests.
58-
- `nx run-many -t build` – rebuild all packages when changes span the dependency graph.
59-
- `nx test <package>` – execute Jest suites for the affected package.
60-
- `nx test <package> --testPathPattern="<file-name>"` - test specific test file
61-
- `nx test <package> --testPathPattern="<file-name>" --testNamePattern="<test-name>"` - test specific test name in a specific test file
62-
- `nx e2e <package>` – run Playwright flows when altering website behaviour.
63-
- `nx lint <package>` – apply ESLint and custom rules before final review.
64-
- `nx benchmark <package>` – assess performance regressions; filter via `-- -t "pattern"` when needed.
52+
- `yarn nx clean` – purge all dist folders when switching branches or before packaging releases.
53+
- `yarn nx format` – format repo files; run from the project root before committing.
54+
- `yarn nx build <package>` – compile a specific package after code edits.
55+
- `yarn nx build:types <package>` – regenerate declaration files when touching exported APIs.
56+
- `yarn nx build:package <package>` – create ESM/CJS bundles to validate publishable output.
57+
- `yarn nx build:umd <package>` – produce UMD bundles for browser distribution smoke-tests.
58+
- `yarn nx run-many -t build` – rebuild all packages when changes span the dependency graph.
59+
- `yarn nx test <package>` – execute Jest suites for the affected package.
60+
- `yarn nx test <package> --testPathPattern="<file-name>"` - test specific test file
61+
- `yarn nx test <package> --testPathPattern="<file-name>" --testNamePattern="<test-name>"` - test specific test name in a specific test file
62+
- `yarn nx e2e <package>` – run Playwright flows when altering website behaviour.
63+
- `yarn nx lint <package>` – apply ESLint and custom rules before final review.
64+
- `yarn nx benchmark <package>` – assess performance regressions; filter via `-- -t "pattern"` when needed.
6565

6666
## Slash Commands
6767

@@ -121,7 +121,7 @@ For code quality guidelines, see [Code Quality Guide](tools/prompts/guides/code-
121121

122122
Essential practices:
123123

124-
- Run `nx format` before committing
124+
- Run `yarn nx format` before committing
125125
- Self-review your changes before proposing commits
126126
- Ensure tests exercise real implementations, not test helpers
127127

@@ -133,24 +133,24 @@ Essential practices:
133133
1. Update the affected implementation (typically under `packages/ag-charts-*/src/chart`).
134134
2. Adjust public API surface in `packages/ag-charts-types` if signatures change.
135135
3. Sync any dependent docs/examples.
136-
4. Run `nx test ag-charts-community`, `nx test ag-charts-enterprise`, and targeted `nx benchmark` commands when performance is at risk.
136+
4. Run `yarn nx test ag-charts-community`, `yarn nx test ag-charts-enterprise`, and targeted `yarn nx benchmark` commands when performance is at risk.
137137
- **Documentation/content update**
138138
1. Consult the [Documentation Pages Guide](tools/prompts/guides/docs-pages.md) for structure and patterns.
139139
2. If creating a new page, use `/docs-create` command or select appropriate template from `tools/prompts/templates/`.
140140
3. Modify the relevant `.mdoc` under `packages/ag-charts-website/src/content/docs/`.
141141
4. Update `packages/ag-charts-website/src/content/docs-nav/nav.json` if navigation changes.
142142
5. Create or update examples in `_examples/` folder following the [Examples Guide](tools/prompts/guides/examples.md).
143143
6. Ensure all examples are framework-compatible (NO `@ag-skip-fws` for public documentation).
144-
7. Run `nx generate-examples ag-charts-website` to generate framework variants.
145-
8. Run `nx validate-examples` to verify examples typecheck correctly.
146-
9. Test page in dev server with `nx dev` across all frameworks.
147-
10. For significant doc changes, sanity-check with `nx e2e ag-charts-website`.
144+
7. Run `yarn nx generate-examples ag-charts-website` to generate framework variants.
145+
8. Run `yarn nx validate-examples` to verify examples typecheck correctly.
146+
9. Test page in dev server with `yarn nx dev` across all frameworks.
147+
10. For significant doc changes, sanity-check with `yarn nx e2e ag-charts-website`.
148148
11. Optionally run `/docs-review` command to validate technical accuracy.
149149
12. Review [Documentation Checklist](tools/prompts/checklists/docs-page.md) before finalizing.
150150
- **Example-only change** (see [Examples Guide](tools/prompts/guides/examples.md))
151151
1. Edit the example files (`index.html`, `main.ts`, optional `styles.css`/`data.ts`).
152152
2. Mirror updates in the sibling `index.mdoc` docs page.
153-
3. Run the relevant generation/typecheck command plus `nx validate-examples`.
153+
3. Run the relevant generation/typecheck command plus `yarn nx validate-examples`.
154154

155155
### Adding New Chart Types
156156

@@ -172,7 +172,7 @@ When creating or modifying examples:
172172
- **Public examples MUST be framework-compatible**: All documentation examples must work in vanilla, TypeScript, React, Angular, and Vue
173173
- **Write framework-compatible vanilla examples first**: Follow patterns in the Examples Guide to ensure clean transformation
174174
- **Use simple, declarative patterns**: Top-level options, chart instance, and simple event handlers transform cleanly
175-
- **Test generated variants**: Run `nx validate-examples` and visually test framework switcher in dev server
175+
- **Test generated variants**: Run `yarn nx validate-examples` and visually test framework switcher in dev server
176176
- **`@ag-skip-fws` is for internal use ONLY**: Only use for `benchmarks` and `*-test` pages, never for public documentation
177177
- **Redesign instead of skip**: If a public example can't transform cleanly, simplify or redesign it to be framework-compatible
178178
- **Review transformation patterns**: See [Framework Patterns Guide](tools/prompts/guides/examples-framework-patterns.md) for detailed technical reference
@@ -193,7 +193,7 @@ For benchmark guidelines, see [Benchmarks Guide](tools/prompts/guides/benchmarks
193193

194194
Key points:
195195

196-
- Use `nx benchmark` to check performance impact on hotspots.
196+
- Use `yarn nx benchmark` to check performance impact on hotspots.
197197
- Focus on canvas rendering efficiency and memory churn.
198198
- Enable `AG_BENCHMARK_DEBUG=1` locally for detailed memory output.
199199

@@ -207,8 +207,8 @@ Key points:
207207
## Nx Workflow
208208

209209
- **Example Generation**:
210-
- Use `nx generate-examples ag-charts-website` to exercise example generation
211-
- Use `nx generate-thumbnails ag-charts-website` to exercise thumbnail generation
210+
- Use `yarn nx generate-examples ag-charts-website` to exercise example generation
211+
- Use `yarn nx generate-thumbnails ag-charts-website` to exercise thumbnail generation
212212

213213
## JIRA Tickets
214214

tools/prompts/commands/distil.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Group findings into categories:
139139
- Magic numbers/strings
140140
141141
- **Low Priority (polish):**
142-
- Formatting inconsistencies (will be caught by `nx format`)
142+
- Formatting inconsistencies (will be caught by `yarn nx format`)
143143
- Minor style improvements
144144
- Optional JSDoc improvements
145145
@@ -416,7 +416,7 @@ ${commit-hash} - "Distil code quality on ${current_branch}"
416416
417417
- Review the changes to ensure they match your expectations
418418
- Run additional tests if this affects critical functionality
419-
- Consider running `nx e2e ag-charts-website` if documentation was affected
419+
- Consider running `yarn nx e2e ag-charts-website` if documentation was affected
420420
```
421421
422422
## 4. Important Guidelines

tools/prompts/commands/docs-create.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ Checklist results:
211211

212212
1. Create examples (see Example Requirements document)
213213
2. Add page to navigation (see Navigation Entry)
214-
3. Run `nx generate-examples ag-charts-website`
215-
4. Run `nx validate-examples`
216-
5. Test in dev server with `nx dev`
214+
3. Run `yarn nx generate-examples ag-charts-website`
215+
4. Run `yarn nx validate-examples`
216+
5. Test in dev server with `yarn nx dev`
217217
```
218218

219219
## Usage Examples
@@ -352,9 +352,9 @@ After creating documentation with this command:
352352
1. **Review generated content** for accuracy
353353
2. **Create examples** following Example Requirements document
354354
3. **Add to navigation** using provided JSON
355-
4. **Generate framework variants**: `nx generate-examples ag-charts-website`
356-
5. **Validate examples**: `nx validate-examples`
357-
6. **Test in dev server**: `nx dev`
355+
4. **Generate framework variants**: `yarn nx generate-examples ag-charts-website`
356+
5. **Validate examples**: `yarn nx validate-examples`
357+
6. **Test in dev server**: `yarn nx dev`
358358
7. **Optional**: Run `/docs-review` for comprehensive validation
359359

360360
## Related Resources

0 commit comments

Comments
 (0)