Skip to content

Commit 12e1bd8

Browse files
Chore: Gulp clean task migration (#33694)
Co-authored-by: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Co-authored-by: Aliullov Vlad <vladislav.aliullov@devexpress.com>
1 parent 30c4c69 commit 12e1bd8

4 files changed

Lines changed: 19 additions & 21 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For the full executor catalogue, conventions, and refactoring guidance, see @pac
6464

6565
## Build Pipeline
6666

67-
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).
67+
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).
6868

6969
## Conventions
7070

packages/devextreme/gulpfile.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,11 @@
44
const gulp = require('gulp');
55
const multiProcess = require('gulp-multi-process');
66
const env = require('./build/gulp/env-variables');
7-
const cache = require('gulp-cache');
87
const shell = require('gulp-shell');
98
const context = require('./build/gulp/context');
109
const { REMOVE_NON_PRODUCTION_MODULE } = context;
1110

12-
gulp.task('clean', function(callback) {
13-
require('del').sync([
14-
'artifacts/**',
15-
'!artifacts',
16-
'!artifacts/css',
17-
'!artifacts/css/*',
18-
'!artifacts/css/fonts',
19-
'!artifacts/css/fonts/*',
20-
'!artifacts/css/icons',
21-
'!artifacts/css/icons/*',
22-
'!artifacts/npm',
23-
'!artifacts/npm/devextreme',
24-
'!artifacts/npm/devextreme/*.json',
25-
'!artifacts/npm/devextreme-dist',
26-
]);
27-
cache.clearAll();
28-
callback();
29-
});
11+
gulp.task('clean', shell.task('pnpm nx clean:artifacts devextreme'));
3012

3113
require('./build/gulp/bundler-config');
3214
require('./build/gulp/transpile');

packages/devextreme/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"targetDirectory": "./artifacts",
1414
"excludePatterns": [
1515
"./artifacts/css",
16-
"./artifacts/npm/devextreme/package.json"
16+
"./artifacts/npm/devextreme/package.json",
17+
"./artifacts/npm/devextreme-dist"
1718
]
1819
}
1920
},

packages/nx-infra-plugin/AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,18 @@ Each behavior is owned by exactly ONE executor's canonical tests; consumers must
6262
3. Preserve exact functional parity. Verify with the executor's e2e spec before and after.
6363
4. Update consumer imports in one batch.
6464
5. Run the full validation pipeline.
65+
66+
## Migrated gulp tasks
67+
68+
Gulp tasks that have been migrated to Nx executor targets (the gulp task is now a thin `shell.task` delegate):
69+
70+
| Gulp task | Nx target | Notes |
71+
| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72+
| `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')`. |
73+
74+
When migrating additional gulp tasks, follow the same pattern:
75+
76+
1. Ensure the Nx target fully replicates the gulp task's behavior (including exclusion lists, configurations, etc.)
77+
2. Replace the gulp task body with `shell.task('pnpm nx <target> <project>')`.
78+
3. Remove unused imports from the gulpfile.
79+
4. Test that both `gulp <task>` and `pnpm nx <target> <project>` produce identical results.

0 commit comments

Comments
 (0)