cubitt-graph
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Cubitt Graph

Typescript Graph library for the Cubitt framework.

npm version GitHub license Build Status Test Coverage

About

This package contains an in-memory graph with connectors. All Elements have support for dynamic properties. The graph has the following elements:

  • Model A subgraph inside the graph. All Nodes and Edges have to be linked to a Model.
  • Node A traditional Node.
  • Connector A Connector is an element that is connected to a Node, to which edges can be connected. A Node can have many connectors. A Connector can have many edges.
  • Edge An traditional directed edge that can be connected to connectors. It is not possible to connect an Edge directly to a Node.

It's main use case will be for the Cubitt framework, but the graph can be used standalone if it fits your datamodel.

Installation

$ npm install cubitt-graph

Features

  • Intergraph links
  • Hierarchical graphs
  • Connector support
  • Properties support on all Elements
  • Typescript
  • Unit tested

Usage

The Project class (implements GraphInterface) is the main entrypoint for consumers of this package. It is as simple as:

var graph = new Project();

All available methods on this class are described in the Code documentation.

Documentation

For developers

To generate documentation run:

$ npm install --only=dev
$ node_modules/.bin/typedoc --out doc/ --module commonjs --exclude test --readme README.md --target ES5 --mode file src/

To run the tests:

$ npm install --only=dev
cd node_modules/cubitt-graph
$ mocha

To debug the tests (uses node-debug, uses Chrome debugging tools):

  1. First set sourceMaps to true in src/tsdconfig.json (ensures that you can debug the Typescript code instead of the generated JavaScript)
$ npm install --only=dev
$ node-debug _mocha --no-timeouts

People

The original authors of Cubitt are Sander Klock and Thomas Ipskamp. The project is coordinated by Jan Martijn van der Werf.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i cubitt-graph

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • uu-cubitt