UNPKG

1.49 kBMarkdownView Raw
1# Viz.js
2
3[![Build Status](https://travis-ci.org/mdaines/viz.js.svg?branch=master)](https://travis-ci.org/mdaines/viz.js)
4
5This project builds [Graphviz](http://www.graphviz.org) with [Emscripten](http://kripken.github.io/emscripten-site/) and provides a simple wrapper for using it in the browser.
6
7For more information, [see the wiki](https://github.com/mdaines/viz.js/wiki).
8
9## See Also
10
11Have a look at [Dagre](https://dagrejs.github.io/), which is not a hack.
12
13## Getting Viz.js
14
15* Install the [`viz.js` package](https://www.npmjs.com/package/viz.js) from npm.
16* Download from the [releases page](https://github.com/mdaines/viz.js/releases).
17
18## Building From Source
19
20To build from source, first [install the Emscripten SDK](http://kripken.github.io/emscripten-site/docs/getting_started/index.html). You'll also need [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com).
21
22Install the development dependencies using Yarn:
23
24 yarn install
25
26The build process for Viz.js is split into two parts: building the Graphviz and Expat dependencies, and building the rendering script files and API.
27
28 make deps
29 make all
30
31## Running Browser Tests
32
33The browser tests can be run locally using Selenium WebDriver.
34
35First, serve the project directory at http://localhost:8000.
36
37 python -m SimpleHTTPServer
38
39Then, run tests using test-browser/runner.js. For example, to run `test-browser/full.html` in Chrome:
40
41 node test-browser/runner --file full.html --browser chrome