Migrating a v2.0.x Web Application to v2.1.0

To migrate a v2.0.x web application that you created with Oracle JET tooling commands, install the v2.1.0 version of generator-oraclejet, scaffold a blank web application, copy existing content to the new directory structure, and update configuration files as needed.

To migrate your v2.0.x Oracle JET web application to v2.1.0:

  1. Upgrade the tooling to use the v2.1.0 version of generator-oraclejet.

    As Administrator on Windows or using sudo as needed on Macintosh and Linux systems, enter the following commands in a terminal window to remove the v.2.0.x version of the generator and install v2.1.0.

    1. [sudo] npm uninstall -g generator-oraclejet

    2. [sudo] npm install generator-oraclejet@2.1.0 -g

      Tip:

      You can also enter [sudo] npm install generator-oraclejet@latest -g to install the latest published version. This command will also install v2.1.0.
  2. Scaffold a new v2.1.0 web application: yo oraclejet newAppDir.

    When you run the command, the Oracle JET tooling creates the newAppDir folder if needed and installs the top level application folders which have a new organization for v2.1.0.

    The image is described in the surrounding text.
  3. In newAppDir, delete the contents of the src folder.
  4. Copy the following files and folders from your existing application to newAppDir/src .
    2.0.x File/Folder 2.1.0 File/Folder Description

    oldAppDir/index.html

    newAppDir/src/index.html

    Copy existing index.html file.

    oldAppDir/js/*

    newAppDir/src/js*

     

    oldAppDir/css/*

    newAppDir/src/js*

     
  5. In newAppDir/src, edit index.html and replace the existing css reference with the v2.1.0 injector reference.
    The image is described in the surrounding step.
  6. Update the Oracle JET bower configuration to reference the v2.1.0 version of Oracle libraries and updated versions of jQuery, jQueryUI, Promise, and Hammer.js.
    1. Open newAppdir/src/js/main.js and edit requirejs.config() paths to point to the updated libraries.

      The image is described in the surrounding text.
    2. Open newAppdir/src/js/main-release-paths.js

      and edit the paths to point to the same updated libraries you referenced in the previous step.
    3. If you added any additional libraries to your application, add the dependency to bower.json in your application’s top level folder.

    4. In newAppDir, enter the following command to add the dependencies to your application: bower install.

  7. If you added any additional npm modules to your application, do the following to migrate the modules to your v2.1.0 application:
    1. Copy the module dependences from oldAppDir/package.json to newAppDir/package.json.

    2. In a terminal window, in newAppDir, enter the following command to install the additional npm modules: npm install.

  8. To test the migration, run grunt serve to build and serve the application.