Installing the Offline Persistence Toolkit

Use npm to install the offline persistence toolkit. After installation, you must update your application’s src/js/path_mapping.json file to recognize the new package.

  1. Change to your application’s top level directory and open a terminal window.
  2. At the terminal prompt, enter the following command to install the toolkit: npm install @oracle/offline-persistence-toolkit --save.
  3. Change to your application’s src/js directory and open path_mapping.json for editing.
  4. Add the persistence toolkit to the "libs" entry.

    The easiest way to add the toolkit is to copy an existing entry that’s similar to your library and modify as needed. A sample entry for offline-persistence-toolkit, which started with a copy of the "ojs" entry, is shown below.

    "libs": {
    
        "offline-persistence-toolkit": {
          "cdn": "",
          "cwd": "node_modules/@oracle/offline-persistence-toolkit/dist",
          "debug": {
            "cwd": "debug",
            "src": ["**"],
            "path": "libs/offline-persistence-toolkit/debug",
            "cdn": ""
          },
          "release": {
            "cwd": "min",
            "src": ["**"],
            "path": "libs/offline-persistence-toolkit/min",
            "cdn": ""
          }
    },

For information about using the toolkit once you have it installed in your Oracle JET application, see the README.md and Wiki for the persistence toolkit on Github at https://github.com/oracle/offline-persistence-toolkit.