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.
Guide
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.
npm install from the .tgz filenpx einvoice-validate-js selftestPut 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.
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.
| 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 |
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.
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 and all rule packages are free and available on GitHub and Packagist. You can buy VAMPIRE JS in the shop on invoicePress.de.