-
Notifications
You must be signed in to change notification settings - Fork 156
Debug & test migrations & schematics
Viktor Aladzhov edited this page Jun 11, 2024
·
3 revisions
From the Terminal window in VSCode, choose the JavaScript debug terminal:

and call the command. In the case of the migrations the command is:
ng g igniteui-angular/migrations/migration-collection.json:migration-XX
- A test project, having an old version of igniteui-angular (with some old properties, events, and classes), on which the migrations are to be applied.
-
npm i ts-node- executed on the test project. - In
igniteui-angularrepo, check the 'Run migration' step in the launch.json and modify steps, according to the local directories for the test project andigniteui-angularrepo and migrations entry point. - Put a breakpoint and start debugging.
- A test project, created with ng CLI (using
ng newcommand), on which the 'ng add' schematic is to be applied. -
npm i ts-node- executed on the test project. - In
igniteui-angularrepo, check the 'Run schematics' step in the launch.json and modify steps, according to the local directories for the test project andigniteui-angularrepo and schematics entry point. - Put a breakpoint and start debugging.
- Use the test project from Debug
ng addschematics in igniteui-angular section above. - You need to commit the changes to the test project in order to check the new changes coming from the igniteui-cli schematics.
- In
igniteui-clirepo, check theRun schematics:ng-neworRun schematics:cli-configstep in the launch.json and modify steps, according to the local directories for the test project andigniteui-clirepo and schematics entry point. - Put a breakpoint and start debugging.
If you need to test schematics changes from both igniteui-angular and igniteui-cli you need to release a beta package for the igniteui-cli and update it here: "@igniteui/angular-schematics": "~14.0.1000"
Then you need to:
- build the entire project
npm run build:lib - build schematics with
npm run build:schematics. - build the migrations (in case you need to test them) with
npm run build:migrations - cwd to ./dist/igniteui-angular
npm pack- copy the pack (igniteui-angular-0.0.1.tgz) to the project you want to test (need to be created beforehand with
ng new) -
ng add .\igniteui-angular-0.0.1.tgz(or use the alternativenpm i igniteui-angular-0.0.1.tgz&ng g igniteui-angular:ng-add)