Timo Hocker 9c2c95e108
All checks were successful
continuous-integration/drone/push Build is passing
update-scanner: automatic update
@sapphirecode/encoding-helper: 1.0.46 ==> 1.0.48 minor
@sapphirecode/eslint-config-ts: 1.1.17 ==> 1.1.19 minor
ava: 3.9.0 ==> 3.10.1 minor
eslint: 7.3.1 ==> 7.4.0 minor
typescript: 3.9.5 ==> 3.9.6 minor
2020-07-10 12:35:57 +02:00
2020-07-10 08:30:42 +02:00
2020-04-24 12:22:57 +02:00
2020-05-17 17:17:39 +02:00
2020-04-17 15:43:34 +02:00
2020-05-17 17:17:39 +02:00
2020-05-17 17:17:39 +02:00
2020-07-10 12:35:57 +02:00
2020-04-24 12:36:04 +02:00
2020-07-10 12:35:57 +02:00

@sapphirecode/graphviz-builder

version: 1.2.x

constructing graphviz files using an easy typescript interface

Installation

npm:

npm i --save @sapphirecode/graphviz-builder

yarn:

yarn add @sapphirecode/graphviz-builder

Usage

Object structure

import {Graph,Color} from '@sapphirecode/graphviz-builder';

// create a new graph
const g = new Graph('foo');

// add a node to the graph
// this function returns the full name of the node that's later used for creating edges
const bar = g.add_node('bar');

// if you want to specify attributes
const baz = g.add_node(n => {
  n.name = 'baz';
  n.label = 'node baz';
  n.color = Color.red;
});

// connect nodes
g.add_edge(bar, baz);

// add a subgraph
g.add_graph(sg=>{
  sg.name = 'subgraph';

  sg.add_node('foo');
})

License

MIT © Timo Hocker timo@scode.ovh

Description
No description provided
Readme 441 KiB
Languages
TypeScript 100%