Skip to content

unlikelyzero/openmct-as-a-dependency

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMCT as a Dependency

This repository serves as an example to guide users on how to build, develop, and test Open MCT when it's used as a dependency.

Please refer to the following showcases for a comprehensive understanding:

Please note, this is not the starting point for newcomers! To familiarize yourself with Open MCT, refer to the Open MCT Tutorials. These tutorials provide step-by-step instructions to help you get started and also address common developer use cases.

Development

A comprehensive development guide is available here.

Building

There are two ways to specify OpenMCT in your build process:

  1. Node package hosted on npm: This method is ideal if you do not plan to make any changes to the core OpenMCT project or if you are satisfied with using older/stable builds. Specify it in your package.json as follows:
"dependencies": {
    "openmct": "stable",

If you want to use a specific version, you can do it like this:

"dependencies": {
    "openmct": "^2.2.5",

GitHub repo alias: This method is suitable if you plan on using recent builds of OpenMCT or if you want to use pre-production versions.

"dependencies": {
    "openmct": "nasa/openmct#master",

Testing

There are two approaches to testing with Open MCT as a dependency: unit tests and e2e (end-to-end) tests.

In both cases, it's essential to gather the devDependencies from the OpenMCT project to run the tests. Implement this with a build step to be executed just before your tests are run:

"build:example": "npm install openmct@unstable --no-save",
"build:example:master": "npm install nasa/openmct#master --no-save",

Unit Tests as a Dependency

Open MCT unit tests are designed to be run with Karma and Jasmine.

e2e Tests as a Dependency

In addition to our unit test pattern, we also have an established e2e test-as-a-dependency model. It is widely used in both open-source and closed-source repositories. For a good open-source example, please refer to openmct-yamcs

About

Build with Open MCT as a dependency

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.7%
  • Vue 1.3%