Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vnu-jar

validator375.5kMIT25.12.7TypeScript support: definitely-typed

Provides the Nu Html Checker «vnu.jar» file

checker, html, lint, linter, jar, nu, validator, vnu, w3c

readme

vnu-jar: Check HTML from JavaScript

vnu-jar lets you use the Nu Html Checker (vnu) from within JavaScript code — to catch unintended mistakes in HTML, CSS, and SVG content.

Install latest release version

npm install --save vnu-jar

Install 'next' version

npm install --save vnu-jar@next

Example

'use strict';

const { execFile } = require('child_process');
const vnu = require('vnu-jar');

// Print path to vnu.jar
console.log(vnu);

// Work with vnu.jar, for example get vnu.jar version
execFile('java', ['-jar', `"${vnu}"`, '--version'], { shell: true }, (error, stdout) => {
    if (error) {
        console.error(`exec error: ${error}`);
        return;
    }

    console.log(stdout);
});