Skip to content

Commit

Permalink
Switch build/vnu-jar.js to a module (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Apr 26, 2023
1 parent 31c78c4 commit 1c39059
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "script"
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
Expand All @@ -30,9 +30,6 @@
"env": {
"browser": true,
"node": false
},
"parserOptions": {
"sourceType": "module"
}
}
]
Expand Down
6 changes: 2 additions & 4 deletions build/vnu-jar.js → build/vnu-jar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

'use strict'

const { execFile, spawn } = require('node:child_process')
const vnu = require('vnu-jar')
import { execFile, spawn } from 'node:child_process'
import vnu from 'vnu-jar'

execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"serve": "hugo server --port 4000 --disableFastRender",
"serve-only": "npx sirv-cli _site --port 4000",
"test": "npm-run-all build --parallel --continue-on-error --aggregate-output test-*",
"test-eslint": "eslint --ignore-path .gitignore --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
"test-eslint": "eslint --ignore-path .gitignore --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .js,.mjs .",
"test-fusv": "fusv src/assets/scss/",
"test-stylelint": "stylelint src/assets/scss/ --cache --cache-location .cache/.stylelintcache",
"test-markdownlint": "markdownlint-cli2 \"**/*.md\" \"!**/node_modules/**\"",
"test-linkinator": "linkinator _site --recurse --silent --skip \"^(?!http://localhost)\"",
"test-vnu": "node build/vnu-jar.js",
"test-vnu": "node build/vnu-jar.mjs",
"test-lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
"netlify": "cross-env-shell HUGO_BASEURL=$DEPLOY_PRIME_URL npm run build"
},
Expand Down

0 comments on commit 1c39059

Please sign in to comment.