Create a wrapper script for npm package to fix npm install issues
This commit is contained in:
parent
14ecec1d4f
commit
53c8eaa4c2
3 changed files with 14 additions and 1 deletions
12
cli/npm/cli.js
Executable file
12
cli/npm/cli.js
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const path = require('path');
|
||||
const spawn = require("child_process").spawn;
|
||||
const executable = process.platform === 'win32'
|
||||
? 'tree-sitter.exe'
|
||||
: 'tree-sitter';
|
||||
spawn(
|
||||
path.join(__dirname, executable),
|
||||
process.argv.slice(2),
|
||||
{stdio: 'inherit'}
|
||||
).on('close', process.exit)
|
||||
Loading…
Add table
Add a link
Reference in a new issue