Skip to content

Commit 2d14b2e

Browse files
committed
adapt node-binding into a CLI package
1 parent c0f1ea5 commit 2d14b2e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

node-binding/cli.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env node
2+
const cppLinter = require('./index.js')
3+
4+
process.argv.shift(); // pop the path to `node` interpreter
5+
6+
cppLinter.main(process.argv);

node-binding/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"engines": {
1919
"node": ">= 10"
2020
},
21+
"bin": {
22+
"cpp-linter": "cli.js"
23+
},
2124
"scripts": {
2225
"artifacts": "napi artifacts",
2326
"build": "napi build --platform --release",

0 commit comments

Comments
 (0)