How link WebMap package to the migrated Application
Last updated
Last updated
Sometimes when we want to debug a frontend package in the migrated application the process of generating a package, and installing it, and then using it can be a bit slow.
npm has a feature called link, which allows us to link the node_module of a package to an address on the PC's storage. For example, if we have a migrated application and we want to make some changes in the @mobilize/winforms-components repository, you do the yarn install or the npm install that you normally do, but how can you make changes to that package and test them in the migrated application?
Let's assume that you have a migrated project, to which you want to connect the @mobilize/winforms-components repository to test some changes.
Go to the repository path, in my case is D:\Repositories\WFNetKendoComponents\WinformsComponentopen a cmd and compile the application
Go with the terminal to the dist folder after compiling the repository, in my case is D:\Repositories\WFNetKendoComponents\WinformsComponent\dist and execute the link command.
You should see something like that:
Add a new property preserveSymlinks in the angular.json of the migrated project.
Open a cmd in the root of the migrated application and execute the next npm link with the package_name:
you should see something like:
If you check your node_modules you should see a shortcut in your package folder
After link the package, you must compile your application as usual, for example
or
or
Suppose you already did the linking process and you made a change to the @mobilize/winforms-components repository that you want to test in your migrated application.
Stop the ng serve process if you are using it in the migrated application.
Compile the repository with the change made.
Compile the migrated application or start the ng serve process.
@mobilize/angularclient
@mobilize/base-components
@mobilize/winforms-components
@mobilize/powercomponents
@mobilize/jns-winforms-components
@mobilize/acs-winforms-components
You can use one or more linked repositories in a migrated application.
you can execute the unlink command to delete the link folder.