Migrating a v3.0.0 Application to v3.2.0

To migrate your Oracle JET application to v3.2.0, you must upgrade npm packages and update theme and library reference paths.

  1. At a terminal prompt, enter the following command to clean the npm cache:
    npm cache clean
    
  2. Upgrade the tooling to use the v3.2.0 version of generator-oraclejet.

    As Administrator on Windows or using sudo as needed on Macintosh and Linux systems, enter the following command in a terminal window to install v3.2.0:

    [sudo] npm install generator-oraclejet@~3.2.0 -g
    
  3. Enter the following commands to change to the application’s top level directory and upgrade local npm dependencies:
    cd appDir
    npm uninstall grunt-oraclejet oraclejet-tooling
    npm uninstall grunt-bowercopy --save-dev
    npm install grunt-oraclejet@~3.2.0 oraclejet-tooling@~3.2.0 --save-dev
    npm install oraclejet@~3.2.0 --save
    
  4. Review the Theming section in the release notes for SCSS variable or other changes, and update your theming files manually, if needed.
  5. In the application’s top level directory, edit index.html and replace the existing css injector reference with the v3.2.0 version.
    <!-- injector:theme -->
    <link rel="stylesheet" href="css/libs/oj/v3.2.0/alta/oj-alta-min.css" id="css" />
    <!-- endinjector -->
    
  6. Update the Oracle JET library configuration paths to reference the v3.2.0 version of Oracle libraries.
    1. Open appDir/src/js/main.js and edit requirejs.config() paths to point to the updated libraries highlighted below.

       paths:
        //injector:mainReleasePaths
        {
          'knockout': 'libs/knockout/knockout-3.4.0.debug',
          'jquery': 'libs/jquery/jquery-3.1.1',
          'jqueryui-amd': 'libs/jquery/jqueryui-amd-1.12.0',
          'promise': 'libs/es6-promise/es6-promise',
          'hammerjs': 'libs/hammer/hammer-2.0.8',
          'ojdnd': 'libs/dnd-polyfill/dnd-polyfill-1.0.0',
          'ojs': 'libs/oj/v3.2.0/debug',
          'ojL10n': 'libs/oj/v3.2.0/ojL10n',
          'ojtranslations': 'libs/oj/v3.2.0/resources',
          'text': 'libs/require/text',
          'signals': 'libs/js-signals/signals',
          'customElements': 'libs/webcomponents/CustomElements',
          'proj4': 'libs/proj4js/dist/proj4-src',
          'css': 'libs/require-css/css',
        }
        //endinjector
      
    2. Open appDir/src/js/main-release-paths.json and edit the library version numbers to use the same version numbers you referenced in the previous step.

To test the migration, run grunt build and grunt serve with appropriate options to build and serve the application. For a list of available options, enter the following command at a terminal prompt in your application’s top level directory: grunt build help.

If your application uses a custom theme, be sure to include the --theme option to regenerate the CSS:
grunt build [options] --theme=myTheme
To specify multiple custom themes, use:
grunt build [options] --theme=myTheme --themes=myTheme,myTheme1,myTheme2