depcheck-detector-execa
![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen)
![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)
Detector for depcheck that finds dependencies in execa calls.
Install
$ npm install depcheck-detector-execa
$ yarn add depcheck-detector-execa
Usage
Custom detectors are currently only supported when using depcheck
via the Node.js API. Simply add the detector to your depcheck config and run depcheck:
import depcheck from 'depcheck'
import execaDetector from 'depcheck-detector-execa'
const options = {
detectors: [
execaDetector,
],
}
depcheck('/path/to/your/project', options, (unused) => {
console.log(unused.dependencies);
console.log(unused.devDependencies);
console.log(unused.missing);
console.log(unused.using);
console.log(unused.invalidFiles);
console.log(unused.invalidDirs);
})
The detector detects calls like
import execa from 'execa'
execa('foo')
execa('foo', ['--verbose'])
execa.command('foo bar')
License
Unless stated otherwise all works are:
Copyright © Sebastian Landwehr info@dword-design.de
and licensed under:
MIT License