yFiles for HTML Rollup.js Demo

This demo shows how to bundle the yFiles library in a rollup project.

The yFiles modules are imported in the demo sources, so rollup will add the yFiles modules to bundle.js.

The HTML file just references the single bundle.js file containing the demo code as well as all library code.

Additionally, the yFiles optimizer is run before bundling to achieve a smaller, production ready bundle.

Building the demo

If grunt is not available on the command line, install grunt-cli first:

> npm install -g grunt-cli

Install the required npm packages and run the default task of the Gruntfile:

> npm install > grunt

Note that rollup may require more heap memory when bundling the yFiles library than available by default. To increase the available memory, set the --max-old-space-size Node parameter to at least 2048.

Running the demo

The grunt build will place the output files in the dist/ directory inside this demo folder. To run the demo, open ./index.html in a browser.