1.0.2 • Published 3 years ago
npm-java-runner v1.0.2
NPM Java Runner
- Include configured
jarinside the NPM-package. - Provide a layer, delegating all arguments, so that the
jaris runnable withnpx.
So that you can create a command line tool with Java and distribute it as an NPM package.
Usage
Create an index.js with:
#!/usr/bin/env node
require('npm-java-runner/lib/index').run(__dirname);Create package.json with:
{
"name": "NAME",
"runnable-jar-regexp": ".*build/libs/.*\\d+\\.\\d+\\.\\d+\\.jar",
"files": ["build/libs"],
"bin": "./index.js",
"dependencies": {
"npm-java-runner": "a.b.c"
}
}If you release this (npm publish), you will be able to run your jar with:
npx NAME --whatever arguments