Guide

How to install VAMPIRE JS with npm

You buy VAMPIRE JS in the shop on invoicePress.de. You receive the package as a .tgz file, and npm installs it directly from that file. You need no public registry and no credentials for this.


1 · Buy in the shop
on invoicePress.de
2 · Store the file
in a folder of your project
3 · Install
npm install from the .tgz file
4 · Self-test
npx einvoice-validate-js selftest
From the file to your first check: buy, store, install, and confirm with the self-test.

How to put the package into your project

Put the .tgz file into a folder of your project, for example vendor-packages/. Then install the package from there:

npm install ./vendor-packages/<file>.tgz

<file> stands for the name of the file you received. npm writes the path into your package.json. It looks like this, for example:

"dependencies": {
  "@specialpress/einvoice-validator-js": "file:vendor-packages/<file>.tgz"
}

⚠️ The file belongs to your license. So do not put it into a public repository. It may be kept in a private repository, and then the installation runs the same on every machine.


How the installation works in a pipeline

If the file is in your private repository, the command npm ci is all the pipeline needs. If it is not, copy it from your own protected storage into the same folder before running the command.


What is in the package

Part Contents
the library detects the matching rule set, checks the schema, evaluates the rules, and writes the positive validation report and the report in the format of the KoSIT validator
einvoice-validate-js the command line
vampire/ the rule packages, the structure models for the schema check, vampire.js for the browser, the file NOTICE and the license texts
the XML parser for Node; it is included in the package so that the installation needs no further source

How to check that the installation worked

npx einvoice-validate-js selftest

The self-test shows how many rule sets and matching rules are loaded and then checks a sample document. If it passes, VAMPIRE JS is ready to use.


How to get new versions

You receive a new version with new rule releases as a new file. Replace the old file in your folder, adjust the file name in package.json, and run npm install. A new version never has the old file name. The reason: npm records the checksum of the file in package-lock.json, and a changed file under the same name would no longer match that checksum.

How to check your first invoice after that is described in the documentation for JavaScript.


VAMPIRE PHP free, VAMPIRE JS in the shop.

VAMPIRE PHP and all rule packages are free and available on GitHub and Packagist. You can buy VAMPIRE JS in the shop on invoicePress.de.