Migrating ePortal MDA Project Directly to a Visual Studio Code Cordova Project

Perform the following steps to migrate directly to Visual Studio Code Cordova Project:

  1. Set up your environment. See Creating a Cordova Project Using Visual Studio Code for more information on creating a Cordova project using the Unisys Project template.

  2. From a command prompt, change to the directory where the Cordova project folder will be created (for example, C:\CordovaProjects).

  3. Use the following syntax at the command prompt to create a new Cordova project folder with the Unisys Cordova template that was installed:

    For example:

    cordova create NewMDA  com.unisys.newMDA MyNewMDA --template C:\Users\<UserName>\AppData\Roaming\npm\node_modules\Unisys-cordova-template

    A basic Cordova project is created and files contained in the Unisys supplied template are applied to the project.

  4. Add other custom files from the original project to appropriate locations in the new project, overwriting any existing files in the new location.

    Notes:

    Custom files are files that were added to the project by the user, or existing files that were updated by the user in the original ePortal MDA project.

    • Custom files from the “<OldMDA>.Shared\scripts\” folder should be moved to the “<NewMDA>\www\scripts\” folder.

    • Custom files from the “<OldMDA>.Shared\css\” folder should be moved to the “<NewMDA>\www\css\” folder.

    • Custom files from the “<OldMDA<.Shared\images\” folder should be moved to the “<NewMDA<\www\images\” folder.

    • A custom “<OldMDA>.Shared\index.html” file should overwrite the “<NewMDA>\www\index.html” file.

    • A custom “<OldMDA>.Shared\config.xml” file should overwrite the “<NewMDA>\www\config.xml” file.

    • Custom files from the “<OldMDA>.iOS”, “<OldMDA>.Android” and “<OldMDA>.Windows10 “ folders should be moved to the “<NewMDA>\merges\iOS”, “<NewMDA>\merges\Android” and “<NewMDA>\merges\windows” folders respectively, to cater for specific platform requirements.

    where “OldMDA” is the project folder of the original MDA project, and “NewMDA” is the project folder of the new Cordova project, either in Visual Studio or using Visual Studio Code.

  5. Add the required Cordova Plugins required by your project (for example,Contacts, Geolocation, so on). Use the following Cordova command syntax to add a plugin:

    Cordova plugin add <plugin name>

    For example:

    Cordova plugin add cordova-plugin-geolocation

    This adds the Geolocation device access capability to the project.

    Similarly, you can add other additional plugins.

  6. Add any dependent packages (such as JQuery, Bootstrap, so on) to the new Cordova project that the original project relied on.

Your project is ready for use with Visual Studio Code as an Apache Cordova project.

Note: You can perform the same migration procedure for Visual Studio Code running on Windows or a Mac system.