depcheck-detector-execa
![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen)
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:
const depcheck = require('depcheck')
const execaDetector = require('depcheck-detector-execa')
const options = {
detectors: [
execaDetector,
],
}
depcheck(process.cwd(), options, unused => {
console.log(unused.dependencies);
console.log(unused.devDependencies);
console.log(unused.missing);
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