Pro documentation

Free handbook

Installing Pro

Not yet published. No package has been released and the registry at registry.vectorstream.dev is not live yet. This page describes the setup the release is built for. The registry is for Pro customers only and needs a token, which comes with a license.

@vectorstream/pro is not on the public npm registry. It is meant to live on a private registry that also passes the free @vectorstream/* packages through from npm. You point the scope @vectorstream at that registry; a scope can belong to one registry only, and this is why the free packages come through it.

The registry#

Put this into the .npmrc of your project (or of your build machine):

@vectorstream:registry=https://registry.vectorstream.dev/
//registry.vectorstream.dev/:_authToken=${VECTORSTREAM_REGISTRY_TOKEN}

The token is read from the environment variable. Do not write it into the file, and do not commit it. The registry is built for a token of its own per customer. The token only gives access to the packages; it is not the license key, which the page needs at run time.

Then install the packages as usual:

npm install @vectorstream/pro @vectorstream/editor @vectorstream/core @vectorstream/adapter

Pro names @vectorstream/editor, @vectorstream/core and @vectorstream/adapter as peer dependencies, in the range of the version it was tested with. Install the same versions of the free packages that Pro asks for. The package comes as ES modules with type declarations.

Plugging Pro in#

There are two ways, and they do the same:

  • For every editor built afterwards: import '@vectorstream/pro/global'. The import has a side effect on purpose. Make sure your bundler keeps it; the package declares this file as its side effect.
  • For one editor: new Editor(…, adapter, { erweiterungen: [proErweiterung()] }), with proErweiterung from @vectorstream/pro.

The list of violations is a separate entry, @vectorstream/pro/ui, see The list of violations. Give Pro its license key as described in Setting up the license key.

Without Pro the free editor is unchanged. The cut between the two is described in Free and Pro.

See it on a map.