chore: Remove gulp from app demos#33495
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the Gulp-based workflow from apps/demos and replaces the former gulp tasks with plain Node.js scripts invoked via package.json scripts and Nx run-commands, simplifying the demos’ build/prepare pipeline and dropping the gulp dependency.
Changes:
- Removed
gulpfromapps/demosdependencies and deleted theapps/demos/gulpfile.js/*tasks. - Added Node.js script replacements for the former
gulp js,gulp shared,gulp bundles, andgulp update-configtasks. - Updated Nx target configuration (
apps/demos/project.json) and repo documentation to reflect the new build approach.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Removes the gulp entry from the demos importer. |
| apps/demos/scripts/update-config.js | New Node script replacing gulp update-config (writes bundled-mode demo configs). |
| apps/demos/scripts/prepare-shared.js | New Node script replacing gulp shared (copies shared resources). |
| apps/demos/scripts/prepare-js-configs.js | New Node script replacing gulp js (init repo config, copy shared JS resources, write non-bundle configs). |
| apps/demos/scripts/build-bundles.js | New Node script replacing gulp bundles (copy bundles + build framework bundles). |
| apps/demos/project.json | Switches targets to nx:run-commands and updates inputs to reflect new scripts/utilities. |
| apps/demos/package.json | Removes gulp dependency; rewires scripts to Node-based replacements. |
| apps/demos/gulpfile.js/shared.js | Deletes Gulp shared task implementation. |
| apps/demos/gulpfile.js/js.js | Deletes Gulp js/bundles task implementation. |
| apps/demos/gulpfile.js/index.js | Deletes Gulp task exports. |
| apps/demos/.gitignore | Removes ignore entry related to gulpfile eslint config. |
| .github/copilot-instructions.md | Updates build-system description to remove Gulp references. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
apps/demos/project.json:74
prepare-bundlesnow runsnode scripts/update-config.js, which rewrites demoDemos/**/config.jsfiles (viautils/internal/create-config.js). However, the targetoutputsonly lists{projectRoot}/bundles, so Nx caching/restores won’t account for the updated config files. Add{projectRoot}/Demos/**/config.js(and any other generated config outputs, if applicable) to this target’soutputsto keep cache correctness.
"prepare-bundles": {
"executor": "nx:run-commands",
"options": {
"commands": [
"pnpm run generate-devextreme-angular-umd",
"node scripts/build-bundles.js",
"node scripts/update-config.js"
],
"parallel": false,
"cwd": "{projectRoot}"
},
"dependsOn": [
// "^build" uncomment me after migrating to PNPM
],
"inputs": [
"default",
"{projectRoot}/scripts/**/*",
"{projectRoot}/utils/bundle/**/*",
"{projectRoot}/utils/internal/create-config.js",
"{projectRoot}/rollup.devextreme-angular.umd.config.mjs"
],
"outputs": [
"{projectRoot}/bundles"
]
apps/demos/project.json:133
prepare-jsrunsgenerate-ng-umd,generate-external-bundles, andnode utils/create-tgz-packages.js, but the targetinputsdon’t include the corresponding Rollup config files (rollup.ng.umd.config.mjs,rollup.external.bundles.config.mjs) orutils/create-tgz-packages.js. This can make Nx cache the target with stale results when those files change. Consider adding these files toinputs(or broadening to{projectRoot}/utils/**/*/{projectRoot}/rollup*.config.mjsif that’s acceptable for caching).
"prepare-js": {
"executor": "nx:run-commands",
"options": {
"commands": [
"pnpm nx build devextreme",
"pnpm nx run-many --targets=pack --projects=devextreme-angular,devextreme-react,devextreme-vue --parallel",
"node scripts/prepare-js-configs.js",
"pnpm run generate-ng-umd",
"pnpm run generate-devextreme-angular-umd",
"pnpm run generate-external-bundles",
"node utils/create-tgz-packages.js"
],
"parallel": false,
"cwd": "{projectRoot}"
},
"inputs": [
"default",
"{projectRoot}/scripts/**/*",
"{projectRoot}/utils/shared/config-helper.js",
"{projectRoot}/utils/internal/create-config.js",
"{projectRoot}/utils/copy-shared-resources/**/*",
"{projectRoot}/rollup.devextreme-angular.umd.config.mjs"
],
"outputs": [
"{projectRoot}/Demos/**/config.js"
]
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/demos/project.json:133
node scripts/prepare-js-configs.jscallsconfig-helper.init()(which may createrepository.config.json) andcreate-config.run()(which also writesDemos/**/tsconfig.json). The targetoutputscurrently only listDemos/**/config.js, so Nx cache hits won’t restore the other generated, gitignored files. Consider adding{projectRoot}/Demos/**/tsconfig.json(and{projectRoot}/repository.config.jsonif it’s expected to exist after this target) tooutputs.
"outputs": [
"{projectRoot}/Demos/**/config.js"
]
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/demos/project.json:138
scripts/prepare-js-configs.jscan generate{projectRoot}/repository.config.json(viautils/shared/config-helper.init()) andDemos/**/tsconfig.jsonfiles (viacopyTsConfigForApproaches()inutils/internal/create-config.js). Theprepare-jstarget caches onlyDemos/**/config.jsright now, so cached runs may not restore those generated files. Add"{projectRoot}/repository.config.json"and"{projectRoot}/Demos/**/tsconfig.json"to this target’soutputs.
"outputs": [
"{projectRoot}/Demos/**/config.js"
]
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Arman Jivanyan <arman.jivanyan@devexpress.com>
…gulp/remove-gulp-from-app-demos # Conflicts: # .github/copilot-instructions.md
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/demos/project.json:139
prepare-jsrunscreateConfig.run(...), which also copiestsconfig.jsoninto each demo approach directory (seeutils/internal/create-config.js:120-127). The target outputs only declareDemos/**/config.js, so Nx caching/affected logic may miss changes toDemos/**/tsconfig.json.
"outputs": [
"{projectRoot}/Demos/**/config.js"
]
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/demos/project.json:139
prepare-jsrunsnode scripts/prepare-js-configs.js, which callscreate-config.run(...)and always copiesDemos/**/tsconfig.json(seeutils/internal/create-config.js:120-126). Since these files are gitignored, they should be listed in the target outputs; otherwise Nx caching/restores can miss them and leave the workspace without generated tsconfigs.
"outputs": [
"{projectRoot}/Demos/**/config.js"
]
| const frameworks = ['vue', 'angular', 'react']; | ||
| await Promise.all( | ||
| frameworks.map(async (framework) => { | ||
| console.log(`bundle-${framework}: starting...`); | ||
| await build(framework); | ||
| console.log(`bundle-${framework}: done`); | ||
| }) | ||
| ); |
No description provided.