# depstat

> get info on your project's dependencies

Latest version **0.0.3** (published 2016-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install depstat
pnpm add depstat
yarn add depstat
bun add depstat
```

Provides the command `depstat`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-09-24 |
| First published | 2016-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Landan Jackson |
| Maintainers | lmj0011 |

## Links

- npm: https://www.npmjs.com/package/depstat
- Repository: https://github.com/lmj0011/depstat
- Issues: https://github.com/lmj0011/depstat/issues
- npm.io page: https://npm.io/package/depstat

## Dependencies (9)

- [yargs](https://npm.io/package/yargs.md) ^5.0.0
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.6
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [detective](https://npm.io/package/detective.md) ^4.3.1
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.3
- [collections](https://npm.io/package/collections.md) ^5.0.4
- [array-flatten](https://npm.io/package/array-flatten.md) ^2.1.0
- [detective-es6](https://npm.io/package/detective-es6.md) ^1.1.5

## Recent versions

- 0.0.3 (latest) — 2016-09-24
- 0.0.2 — 2016-09-18
- 0.0.1 — 2016-09-18

## README

# depstat
___
find all calls to `require()` or `import()` from the command line and tells how many times a module has been referenced in the js file(s)

Note:

__this module is in very early development, please report any issues to github__

__searching for es6 modules will only work with jspm as the module loader__
___
### Install
```sh
$: npm install -g depstat
```
### Usage
_from your **project's root folder**_:
``` sh
$:~/Project$ depstat
```
_depstat will assume the source directory is located at `./src` and package.json is located at `.`_:

_but this can be changed with options:_
``` sh
$:~/Project$ depstat --path=[path to src files] --dep=[path to package.json]
```
## example 1
##### with CommonJS loader

~/Project/package.json:
```json
{
  [...]
  "dependencies": {
    "array-flatten": "^2.1.0",
    "colors": "^1.1.2",
    "minimatch": "^3.0.3",
  }
}
```
~/Project/src/foo.js:
``` js
const colors = require('colors');
const flatten = require('array-flatten');
const minimatch = require('minimatch');
```

_then from the command line inside of your **project's root folder**_:
``` sh
$:~/Project$ depstat
```
_depstat automatically searches through all **js** files in the **./src** directory_

_the result_:
``` sh
times ref.      dep name                                           format    
___________________________________________________________________________
1               colors                                             CommonJS  
___________________________________________________________________________
1               array-flatten                                      CommonJS  
___________________________________________________________________________
1               minimatch                                          CommonJS  
```

## example 2
##### with es6 loader - jspm

~/Project/package.json:
```json
"jspm": {
    "directories": {
      "doc": "doc",
      "test": "test"
    },
    "dependencies": {
       "array-flatten": "^2.1.0",
       "colors": "^1.1.2",
       "minimatch": "^3.0.3",
    },
    "devDependencies": {}
  },
```
~/Project/src/foo.js:
``` js
import colors from 'colors';
import flatten from 'array-flatten';
import minimatch from 'minimatch';
```

_then from the command line_:
``` sh
$:~/www/client1/Project$ depstat --es6
```
_depstat automatically searches through all **js** files in the **./src** directory_

_the result_:
``` sh
times ref.      dep name                                           format    
___________________________________________________________________________
1               colors                                             es6  
___________________________________________________________________________
1               array-flatten                                      es6  
___________________________________________________________________________
1               minimatch                                          es6  
```

---
_Source: https://npm.io/package/depstat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
