# what-i-actually-need

> ![logo](https://i.imgur.com/Zc5otUj.png) Scans your code to find all the require() to tell you what you actually need for the node project. Uses a single file as the starting point then does depth first search. Optional -- It can also update your package.

Latest version **1.0.5** (published 2019-10-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install what-i-actually-need
pnpm add what-i-actually-need
yarn add what-i-actually-need
bun add what-i-actually-need
```

Provides the command `what-i-actually-need`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-10-09 |
| First published | 2019-05-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | isimar |

## Links

- npm: https://www.npmjs.com/package/what-i-actually-need
- Repository: https://github.com/isimar/what-i-actually-need
- Homepage: https://github.com/isimar/what-i-actually-need#readme
- Issues: https://github.com/isimar/what-i-actually-need/issues
- npm.io page: https://npm.io/package/what-i-actually-need

## Dependencies (3)

- [find-requires](https://npm.io/package/find-requires.md) ^1.0.0
- [command-line-args](https://npm.io/package/command-line-args.md) ^5.1.1
- [command-line-usage](https://npm.io/package/command-line-usage.md) ^5.0.5

## Recent versions

- 1.0.5 (latest) — 2019-10-09
- 1.0.4 — 2019-10-09
- 1.0.3 — 2019-05-24
- 1.0.2 — 2019-05-22
- 1.0.1 — 2019-05-21
- 1.0.0 — 2019-05-21

## README

![logo](https://i.imgur.com/Zc5otUj.png)
Scans your code to find all the require() to tell you what you actually need for the node project. Uses a single file as the starting point then does depth first search. Optional -- It can also update your package.json after to only include the needed modules under dependencies. 

## Usage

### install
```
$ npm i what-i-actually-need -g
```

### run
Run the following in a node project.
By default it uses index.js as the entry point to start the scan.
```
$ what-i-actually-need
```
example output:
```
-- Running What-I-Actually-Need ---

index.js
--> node-sass
--> css-modules-require-hook
--> babel-register

server.js
--> nconf
--> log4js
--> http
--> https
--> fs
--> path

--------------------
12 dependencies are actually needed. There are currently 51 dependencies in package.json.
--------------------

Run the 'what-i-actually-need' command with '--run' flag to update package.json.
```

### Options

### --entry (Default: index.js) 
Entry point of your node based project, it will start the scan from this file.

### --run
To update the package.json dependencies after the scan is complete.

### --help
See the usage docs

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