Skip to content
  1. Tutorials

Integrating Ogma in a browserify project

To use with browserify, there is nothing special to do. Example:

main.js:

js
const Ogma = require('path/to/ogma');

const ogma = new Ogma({ graph: { nodes: [{ id: 0, color: 'blue' }] } });
console.log(ogma.getNode(0).color);

In the command line:

sh
$ browserify main.js > bundle.js