documentationfor yFiles for HTML 2.6

Using yFiles without npm

This section describes how to add the yFiles for HTML library without using npm. This is mainly for reference.

We highly recommend adding yFiles as npm package as shown in the previous chapter. This also enables all coding assistance features automatically.

Unpacking the library files

The yFiles library files are packed in tgz files. To install the library manually, these files have to be unpacked, first. Please switch to the folder /tools/unpack-library-files/ folder and execute the npm task unpack-library-files:

npm run unpack-library-files

Alternatively, you can unpack the tgz file manually and rename the resulting folder package to es-modules or umd.

Where to find the library files

After unpacking the library files can be found in the following folders:

  • lib/es-modules: the production library files in JavaScript module syntax
  • lib/umd: the production library files for UMD loading
  • lib-dev/es-modules: the development library files in JavaScript module syntax
  • lib-dev/umd: the development library files for UMD loading

To include the library in your project copy the appropriate folder to your project folder and include it as source folder in your IDE.

Each folder has a typings sub folder which contains TypeScript definition files for different TypeScript versions. These files are necessary to use yFiles with TypeScript. They can also be used to provide code completion and quick documentation lookup in IDEs like WebStorm and Visual Studio Code. Please follow the instructions in your IDE’s documentation on how to include TypeScript definitions manually.