Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18, 20, 22, 24]
node: [22, 24]
java: [25]
architecture: [x64]
include:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Install this grunt plugin next to your project's [Gruntfile.js][getting_started] with:

```bash
npm install grunt-html -D
npm install grunt-html vnu-jar -D
```

Then add this line to your project's `Gruntfile.js`:
Expand Down Expand Up @@ -183,6 +183,7 @@ Use this option to control the number of threads that grunt-html will use when v
## Potential pitfalls

* vnu.jar requires Java 8 environment or up.
* As of v19.0.0, `vnu-jar` is no longer a bundled dependency and must be installed separately: `npm install vnu-jar -D`.

## License

Expand Down
3 changes: 2 additions & 1 deletion lib/htmllint.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function htmllint(config, done) {
if (stderr) {
try {
result = parseErrorMessages(stderr, config);
} catch (error_) {
} catch(error_) {
// eslint-disable-next-line preserve-caught-error
throw new Error(`${error_}\nInvalid input follows below:\n\n${stderr}`);
}

Expand Down
7 changes: 6 additions & 1 deletion lib/javaArgs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
'use strict';

const jar = require('vnu-jar');
let jar;
try {
jar = require('vnu-jar');
} catch {
throw new Error('vnu-jar is not installed. Run `npm install vnu-jar` to install it.');
}

// Determine proper jarfile arguments
function javaArgs(java, chunk, config) {
Expand Down
Loading
Loading