Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
18353bd
chore(devextreme): create the localization gulp task alternative base…
chaosmirage Dec 22, 2025
2fed628
chore: cleanup migrated localization gulp tasks
chaosmirage Jan 14, 2026
b4c6739
feat(nx-infra-plugin): copy-files, support glob patterns
chaosmirage Jan 14, 2026
4714daa
chore(devextreme): migrate all:build-dev to nx with wrapped as nx tar…
chaosmirage Jan 15, 2026
0724d35
chore: create all:build-testing workflow
chaosmirage Jan 15, 2026
a1b85d3
chore(devextreme): align output paths in nx project config
chaosmirage Jan 14, 2026
40f6184
fix: devextreme-angular, correct config is forwarded to target deps
chaosmirage Jan 15, 2026
c59a993
chore: remove unnecessary steps from all:build-dev workflow
chaosmirage Jan 15, 2026
247b8e6
chore: remove unnecessary steps from all:build-testing workflow
chaosmirage Jan 15, 2026
fb294a4
feat(nx-infra-plugin): make executor output suppressible for cleaner …
chaosmirage Jan 15, 2026
216c6dc
fix: eslint errors
chaosmirage Jan 15, 2026
47eb42a
fix: correctly lauch devextreme build in demos_visual_tests
chaosmirage Jan 16, 2026
5d47a5e
chore: replace --configuration with -c
chaosmirage Jan 20, 2026
f75e7b4
docs: update copilot-instructions.md
chaosmirage Jan 20, 2026
bad76be
chore: remove unnecessary configuraiton option
chaosmirage Jan 20, 2026
c9fe3f2
feat(nx-infra-plugin): create `concatenate-files` executor
chaosmirage Jan 21, 2026
c29ed27
chore(devextreme): create nx targets to replace the `bundler-config` …
chaosmirage Jan 21, 2026
4ea1a59
feat(nx-infra-plugin): add babel-transform executor for CJS/ESM trans…
chaosmirage Jan 23, 2026
995c239
chore(devextreme): add nx targets for transpile task
chaosmirage Jan 26, 2026
930e86f
chore(devextreme): remove transpile code migrated to nx executors
chaosmirage Jan 26, 2026
03366a4
fix(devextreme): add missing bundler-config:prod to build:transpile p…
chaosmirage Jan 27, 2026
45ee747
fix(nx-infra-plugin): fix babel-transform E2E tests failing under pnp…
chaosmirage Jan 27, 2026
1e4c988
chore(devextreme): create the localization gulp task alternative base…
chaosmirage Dec 22, 2025
7794a08
feat(nx-infra-plugin): add create-dual-mode-manifest executor
chaosmirage Jan 23, 2026
6cb7bf7
feat(nx-infra-plugin): enhance build-typescript executor with new opt…
chaosmirage Jan 23, 2026
f2ea395
chore(devextreme): replace gulp wrappers with native nx executors
chaosmirage Jan 26, 2026
8f05d73
chore(devextreme): remove transpile code migrated to nx executors
chaosmirage Jan 26, 2026
1f6aed3
docs: update copilot-instructions.md
chaosmirage Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 70 additions & 8 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- **Languages:** TypeScript, JavaScript, SCSS, C# (.NET for test runner)
- **Package Manager:** pnpm 9.15.4 (specified in package.json)
- **Node Version:** 20.x (required by CI)
- **Build System:** Gulp + Nx + custom build scripts
- **Build System:** Gulp + Nx + custom build scripts + custom Nx executors (via `devextreme-nx-infra-plugin`)
- **Test Frameworks:** QUnit, Jest, TestCafe, Karma (Angular)

## Critical Setup Requirements
Expand Down Expand Up @@ -70,6 +70,8 @@ pnpm install --frozen-lockfile
devextreme-themebuilder/ # Theme builder package
devextreme-metadata/ # Metadata generation for wrappers
devextreme-monorepo-tools/ # Internal tooling
nx-infra-plugin/ # Custom Nx executors for build automation
workflows/ # Cross-package NX build orchestration (all:build-dev, all:build-testing)
testcafe-models/ # TestCafe page object models

/apps/
Expand Down Expand Up @@ -150,20 +152,69 @@ pnpm run clean
```

**Build process includes:**
1. Localization generation
1. Localization generation (via `devextreme-nx-infra-plugin:localization` executor)
2. Component generation (Renovation architecture)
3. Transpilation (Babel)
4. Bundle creation (Webpack)
5. TypeScript declarations
3. Transpilation (via native NX executors: `babel-transform` for JS, `build-typescript` for TS)
4. Bundle creation (Webpack) - `bundle:debug` and `bundle:prod` targets
5. TypeScript declarations - `build:declarations` target
6. SCSS compilation (from devextreme-scss)
7. NPM package preparation
7. NPM package preparation - `build:npm` target

**Granular Nx build targets (can be run individually):**
```bash
pnpx nx build:localization devextreme # Generate localization files
pnpx nx build:transpile devextreme # Transpile source code
pnpx nx bundle:debug devextreme # Create debug bundle
pnpx nx bundle:prod devextreme # Create production bundle
pnpx nx build:npm devextreme # Prepare NPM packages
```

**Build with testing configuration (for CI):**
```bash
pnpx nx build devextreme -c=testing
```

**Important environment variables:**
- `DEVEXTREME_TEST_CI=true` - Enables test mode (skips building npm package)
- `BUILD_ESM_PACKAGE=true` - Builds ESM modules (skips building npm package)
- `BUILD_TESTCAFE=true` - Builds for TestCafe tests
- `BUILD_TEST_INTERNAL_PACKAGE=true` - Builds internal test package

## Custom Nx Executors (nx-infra-plugin)

The `packages/nx-infra-plugin` provides custom Nx executors for build automation:

| Executor | Description |
|----------|-------------|
| `add-license-headers` | Adds DevExtreme license headers to compiled files with version information |
| `babel-transform` | Transforms JS/TS files using Babel with configurable presets, debug block removal, and extension renaming |
| `build-angular-library` | Builds Angular libraries using ng-packagr programmatically |
| `build-typescript` | Compiles TypeScript to CJS or ESM modules with configurable output format, tsconfig, and path alias resolution |
| `clean` | Removes directories and files with support for exclusion patterns |
| `concatenate-files` | Concatenates files with optional content extraction via regex, header/footer, and find/replace transforms |
| `copy-files` | Copies files and directories to specified destinations with glob pattern support |
| `create-dual-mode-manifest` | Generates package.json files for dual-mode (ESM + CJS) support with main, module, typings, and sideEffects |
| `generate-component-names` | Generates TypeScript file with component name constants for test automation |
| `generate-components` | Generates framework components (React/Vue/Angular) from DevExtreme metadata |
| `karma-multi-env` | Runs Karma tests across multiple Angular environments (client, server, hydration) |
| `localization` | Generates CLDR data and compiles localization message files from JSON to JavaScript |
| `pack-npm` | Creates npm packages using `pnpm pack` for distribution |
| `prepare-package-json` | Creates distribution-ready package.json with cleaned dependencies for npm publishing |
| `prepare-submodules` | Creates package.json entry points for submodule exports |

**Example executor usage in project.json:**
```json
{
"build:localization:generate": {
"executor": "devextreme-nx-infra-plugin:localization",
"options": {
"messagesDir": "./js/localization/messages",
"cldrDataOutputDir": "./js/__internal/core/localization/cldr-data"
}
}
}
```

## Testing

### Test Types and Commands
Expand Down Expand Up @@ -348,8 +399,8 @@ pnpm run lint-ts -- --fix
- `packages/devextreme-react/src/**/*` (except templates)
- `packages/devextreme-vue/src/**/*` (except templates)
- `packages/devextreme/js/renovation/**/*.j.tsx`
- `packages/devextreme/js/common/core/localization/default_messages.js`
- `packages/devextreme/js/common/core/localization/cldr-data/**/*`
- `packages/devextreme/js/__internal/core/localization/default_messages.ts`
- `packages/devextreme/js/__internal/core/localization/cldr-data/**/*`

**Source files (EDIT THESE):**
- `packages/devextreme/js/**/*.js` (core logic)
Expand Down Expand Up @@ -378,13 +429,15 @@ pnpm run lint-ts -- --fix
## Key Facts

- **Nx is used for task orchestration** - prefer `pnpx nx` commands over direct npm scripts
- **Custom Nx executors** - `devextreme-nx-infra-plugin` provides specialized executors for localization, file operations, and build tasks
- **Frozen lockfile is mandatory** - CI will fail without it
- **Build artifacts are in gitignore** - never commit `artifacts/` directories
- **Wrappers are generated** - modify generators, not generated code
- **Multiple test frameworks** - QUnit (legacy), Jest (new), TestCafe (E2E)
- **Monorepo uses pnpm workspaces** - dependencies are hoisted
- **CI uses custom runners** - `devextreme-shr2` for most jobs, `ubuntu-latest` for some
- **Timeouts are strict** - optimize for speed, use caching
- **Granular build caching** - individual build steps have proper Nx caching for faster rebuilds

## Quick Reference

Expand All @@ -398,6 +451,14 @@ pnpm run all:build-dev
# Build (prod)
pnpm run all:build

# Build with testing configuration (for CI)
pnpx nx build devextreme -c=testing

# Build specific targets
pnpx nx build:localization devextreme
pnpx nx build:transpile devextreme
pnpx nx bundle:debug devextreme

# Test
pnpx nx run-many -t test
pnpm run test-jest # From devextreme package
Expand All @@ -411,6 +472,7 @@ pnpm run regenerate-all

# Clean
pnpm run clean # From devextreme package
pnpx nx clean:artifacts devextreme # Clean build artifacts only

# Run demos
pnpm run webserver # From root, then visit localhost:8080
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/default_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: >
pnpx nx run-many
-t lint,test
--configuration ci
-c ci
--exclude
devextreme
devextreme-themebuilder
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/demos_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_TOKEN }}
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
BUILD_TEST_INTERNAL_PACKAGE: true
RUN_TESTS: true

jobs:
Expand Down Expand Up @@ -145,13 +144,11 @@ jobs:
shell: bash
run: |
pnpx nx build devextreme-scss
pnpx nx build devextreme
pnpx nx build devextreme -c testing

- name: DevExtreme - Build-all
if: needs.determine-framework-tests-scope.outputs.framework-tests-scope != 'none'
env:
BUILD_TEST_INTERNAL_PACKAGE: true
run: pnpm run all:build-dev
run: pnpm nx all:build-testing workflows

- name: Zip artifacts (for jQuery tests)
working-directory: ./packages/devextreme
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ jobs:
pnpm install --frozen-lockfile

- name: DevExtreme - Build-all
env:
BUILD_TEST_INTERNAL_PACKAGE: true
run: pnpm run all:build-dev
run: pnpm nx all:build-testing workflows

- name: Move packages
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/testcafe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_TOKEN }}
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
BUILD_TEST_INTERNAL_PACKAGE: true
RUN_TESTS: true

jobs:
Expand Down Expand Up @@ -72,7 +71,7 @@ jobs:
NODE_OPTIONS: --max-old-space-size=8192
run: |
pnpx nx build devextreme-scss
pnpx nx build devextreme
pnpx nx build devextreme -c testing

- name: Zip artifacts
working-directory: ./packages/devextreme
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/wrapper_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_TOKEN }}
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
BUILD_TEST_INTERNAL_PACKAGE: true

jobs:
build:
Expand Down Expand Up @@ -49,10 +48,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build devextreme package
env:
BUILD_TEST_INTERNAL_PACKAGE: true
working-directory: ./packages/devextreme
run: pnpx nx build
run: pnpx nx build devextreme -c testing

check-regenerate:
runs-on: devextreme-shr2
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/wrapper_tests_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_TOKEN }}
NX_SKIP_NX_CACHE: ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
BUILD_TEST_INTERNAL_PACKAGE: true

jobs:
build-packages:
Expand Down Expand Up @@ -55,9 +54,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build all DevExtreme packages
env:
BUILD_TEST_INTERNAL_PACKAGE: true
run: pnpm run all:build-dev
run: pnpm nx all:build-testing workflows

- name: Build wrappers apps
working-directory: e2e/wrappers
Expand Down
2 changes: 1 addition & 1 deletion apps/demos/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"script": "prepare-js"
},
"dependsOn": [
{ "projects": ["devextreme"], "target": "build" },
{ "projects": ["devextreme"], "target": "build", "params": "forward" },
{ "projects": ["devextreme-angular", "devextreme-react", "devextreme-vue"], "target": "pack" }
],
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"prepare": "husky install",
"all:update-version": "ts-node tools/scripts/update-version.ts",
"all:build": "ts-node tools/scripts/build-all.ts",
"all:build-dev": "pnpm run all:build --dev",
"all:build-dev": "nx all:build-dev workflows",
"all:pack-and-copy": "nx run-many -t pack-and-copy",
"demos:prepare": "nx run devextreme-demos:prepare-js",
"demos:start": "http-server ./apps/demos --port 8080 -c-1"
Expand Down
19 changes: 16 additions & 3 deletions packages/devextreme-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@
},
"build": {
"executor": "nx:run-commands",
"dependsOn": ["^build"],
"dependsOn": [
{
"dependencies": true,
"target": "build",
"params": "forward"
}
],
"options": {
"commands": [
"pnpm --workspace-root nx clean:dist devextreme-angular",
Expand All @@ -182,7 +188,14 @@
"{projectRoot}/npm/dist"
],
"cache": true,
"inputs": ["default"]
"inputs": ["default"],
"configurations": {
"testing": {
"env": {
"BUILD_TEST_INTERNAL_PACKAGE": "true"
}
}
}
},
"pack": {
"executor": "nx:run-commands",
Expand Down Expand Up @@ -289,7 +302,7 @@
"executor": "nx:run-commands",
"options": {
"commands": [
"pnpm --workspace-root nx build devextreme-angular",
"pnpm --workspace-root nx build devextreme-angular -c testing",
"pnpm --workspace-root nx build:tests devextreme-angular",
"pnpm --workspace-root nx test:all devextreme-angular"
],
Expand Down
Loading
Loading