Demos
This package contains a set of demos that showcase the capabilities of the VSDX Export,
and explain how to use the library.
They are located in the demos directory.
Running the Demos
The yFiles for HTML library is not included in this package but required to run the demos. To set everything up, either follow these instructions or see the next section for technical details.
-
Extract a yFiles for HTML package next to the main directory of this package. Evaluation and non-evaluation packages of yFiles for HTML will both work. In any case, your directory structure will be similar to this:
yfiles/ |- yFiles-for-HTML-Complete-3.1/ |- vsdx-export-for-yfiles-for-html-3.1.0/ -
Run the
startnpm scriptnpm startThis script calls the
prepare-demosscript, which detects the exact version of the yFiles package, and corrects theyfilesdependency in thepackage.jsonif necessary. Also, it copies the yFiles license from a yFiles evaluation package into the./libdirectory, and finally, runsnpm installin that directory. -
If you’re using a regular, non-evaluation package of yFiles, manually place your yFiles license in the
./libdirectory. Otherwise, the license file has already been copied by theprepare-demosscript. -
The
startscript will also start a dev server which hosts the demos. Open the link shown in the terminal to browse the documentation and demos.
Manual Demo Setup
The demos have both yfiles and vsdx-export-for-yfiles-for-html as dependencies and require a valid yFiles license.
Out of the box, these dependencies are provided by the outer project, and a file with the yFiles license
is expected to be located in ./lib/license.json.
Of course, providing the dependencies in any other valid way will work, too.
For example, you can copy the packed npm archive files into a demo’s directory, and directly point the dependencies in
its package.json file to these files:
"dependencies": {
"yfiles": "./yfiles-31.0.0+dev.tgz",
"@yfiles/vsdx-export": "./vsdx-export-for-yfiles-for-html-3.1.0.tgz"
}Similarly, it is neither required to have the license in a separate file nor in this exact location. For more details, please see the Licensing section of the yFiles for HTML documentation.