diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 1f40233b7325..a670af5c1ef4 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -64,7 +64,7 @@ For the full executor catalogue, conventions, and refactoring guidance, see @pac ## Build Pipeline -localization → component generation (Renovation) → transpile (`babel-transform` for JS, `build-typescript` for TS) → bundle (Webpack via `devextreme-nx-infra-plugin:bundle`, debug + prod targets) → TypeScript declarations → SCSS compile (`devextreme-scss`) → npm package preparation. Task orchestration goes through Nx; cross-package builds (`all:build-dev`, `all:build`) live in the `workflows` package. Pre-commit hook runs `lint-staged` (stylelint + eslint --quiet). +clean (`devextreme-nx-infra-plugin:clean` preserving CSS and npm metadata) → localization → component generation (Renovation) → transpile (`babel-transform` for JS, `build-typescript` for TS) → bundle (Webpack via `devextreme-nx-infra-plugin:bundle`, debug + prod targets) → TypeScript declarations → SCSS compile (`devextreme-scss`) → npm package preparation. Task orchestration goes through Nx; cross-package builds (`all:build-dev`, `all:build`) live in the `workflows` package. The `gulpfile.js` clean task is a thin delegate to `pnpm nx clean:artifacts devextreme`. Pre-commit hook runs `lint-staged` (stylelint + eslint --quiet). ## Conventions diff --git a/packages/devextreme/gulpfile.js b/packages/devextreme/gulpfile.js index 3e3bebe1f7f3..c2fe2073953d 100644 --- a/packages/devextreme/gulpfile.js +++ b/packages/devextreme/gulpfile.js @@ -4,29 +4,11 @@ const gulp = require('gulp'); const multiProcess = require('gulp-multi-process'); const env = require('./build/gulp/env-variables'); -const cache = require('gulp-cache'); const shell = require('gulp-shell'); const context = require('./build/gulp/context'); const { REMOVE_NON_PRODUCTION_MODULE } = context; -gulp.task('clean', function(callback) { - require('del').sync([ - 'artifacts/**', - '!artifacts', - '!artifacts/css', - '!artifacts/css/*', - '!artifacts/css/fonts', - '!artifacts/css/fonts/*', - '!artifacts/css/icons', - '!artifacts/css/icons/*', - '!artifacts/npm', - '!artifacts/npm/devextreme', - '!artifacts/npm/devextreme/*.json', - '!artifacts/npm/devextreme-dist', - ]); - cache.clearAll(); - callback(); -}); +gulp.task('clean', shell.task('pnpm nx clean:artifacts devextreme')); require('./build/gulp/bundler-config'); require('./build/gulp/transpile'); diff --git a/packages/devextreme/project.json b/packages/devextreme/project.json index 57272c8b1b82..d641e808c6b8 100644 --- a/packages/devextreme/project.json +++ b/packages/devextreme/project.json @@ -13,7 +13,8 @@ "targetDirectory": "./artifacts", "excludePatterns": [ "./artifacts/css", - "./artifacts/npm/devextreme/package.json" + "./artifacts/npm/devextreme/package.json", + "./artifacts/npm/devextreme-dist" ] } }, diff --git a/packages/nx-infra-plugin/AGENTS.md b/packages/nx-infra-plugin/AGENTS.md index bf94cd2d9d9e..e0365a4661fc 100644 --- a/packages/nx-infra-plugin/AGENTS.md +++ b/packages/nx-infra-plugin/AGENTS.md @@ -62,3 +62,18 @@ Each behavior is owned by exactly ONE executor's canonical tests; consumers must 3. Preserve exact functional parity. Verify with the executor's e2e spec before and after. 4. Update consumer imports in one batch. 5. Run the full validation pipeline. + +## Migrated gulp tasks + +Gulp tasks that have been migrated to Nx executor targets (the gulp task is now a thin `shell.task` delegate): + +| Gulp task | Nx target | Notes | +| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `clean` | `clean:artifacts` | Uses `devextreme-nx-infra-plugin:clean` with `excludePatterns` to preserve `artifacts/css`, `artifacts/npm/devextreme/package.json`, and `artifacts/npm/devextreme-dist`. The gulp task delegates via `shell.task('pnpm nx clean:artifacts devextreme')`. | + +When migrating additional gulp tasks, follow the same pattern: + +1. Ensure the Nx target fully replicates the gulp task's behavior (including exclusion lists, configurations, etc.) +2. Replace the gulp task body with `shell.task('pnpm nx ')`. +3. Remove unused imports from the gulpfile. +4. Test that both `gulp ` and `pnpm nx ` produce identical results.