xAPI.js
  • xAPI.js
  • xAPI Wrapper Library
    • Introduction
    • Getting Started
    • The XAPI Class
    • Statement Resource
    • State Resource
    • Activity Profile Resource
    • Agent Profile Resource
    • About Resource
    • Agents Resource
    • Activities Resource
    • Helpers
    • Verbs
    • Attachment Usages
  • cmi5 Profile Library
    • Introduction
    • Getting Started
    • The Cmi5 Class
    • "cmi5 defined" Statement methods
    • "cmi5 allowed" Statement methods
    • Helpers
Powered by GitBook
On this page
  • UMD (Browser)
  • ES module (Client-side applications)

Was this helpful?

  1. cmi5 Profile Library

Getting Started

The library has been configured to work in multiple environments:

  • UMD (Browser)

  • ESM (Client-side applications)

UMD (Browser)

<script src="https://unpkg.com/@xapi/cmi5"><script>

<script type="text/javascript">
  // Create Cmi5 instance
  const cmi5 = new Cmi5();

  // Initialize AU
  cmi5.initialize();
<script>

ES module (Client-side applications)

For client-side applications built using imports, an ES Module is available for you to install and import into your project.

npm i @xapi/cmi5 --save
import Cmi5 from "@xapi/cmi5";

// Create Cmi5 instance
const cmi5: Cmi5 = new Cmi5();

// Initialize AU
cmi5.initialize();
PreviousIntroductionNextThe Cmi5 Class

Last updated 4 years ago

Was this helpful?