This is a simple library of Models, Enums and Types for the CMDR Journal exposed by Elite Dangerous
$ npm install cmdr-journal
Import the package into your project
//Import the whole library
//CommonJS
const cj = require("cmdr-journal");
//ES2015
import cj from "cmdr-journal";
//Or import just what you need
//CommonJS
const fsdJump = require("cmdr-journal").FSDJump;
//ES2015
import { FSDJump } from "cmdr-journal";
Use the models and enums as you wish
let interdiction = new cj.Interdicton();
The classes available in this library reflect the documentation as provided by Frontier where you can also find examples and some additional descriptions.
Classes have been implemented according to their event value.
Enums have been implemented with sensible names (where possible) and string values that reflect the value as provided by Frontier.
A full list of Classes and Enums available in this library can be found in the docs folder
When creating a new model (e.g. if the Frontier Developments Commander Journal is updated with new event types) then you must create it as a new model file in ./models
and export it from ./models/index.ts
and add it to the JournalEventsUnion
type in ./models/journal-events-union.ts
and the journal-events.enum.ts
in ./enums/journal-events.enum.ts
Once you have finished making your additions run npm run build
and commit the result