@lvce-editor/ripgrep
Version:
A module for using ripgrep in a Node project
31 lines (19 loc) • 831 B
Markdown
A module for using [ripgrep](https://github.com/BurntSushi/ripgrep/) in a Node project.
Same as [vscode-ripgrep](https://github.com/microsoft/vscode-ripgrep), but fixes the github rate limiting error `Downloading ripgrep failed: Error: Request failed: 403` by downloading the files directly instead of also using the github rest api.
```
$ npm install @lvce-editor/ripgrep
```
```js
import { rgPath } = from "@lvce-editor/ripgrep"
import { spawn } from 'node:child_process'
const childProcess = spawn(rgPath, ["abc", "."], {
stdio: "inherit",
});
```
[](https://gitpod.io#https://github.com/lvce-editor/ripgrep)
This project is very much based on https://github.com/microsoft/vscode-ripgrep by Microsoft.