# orphan

> Find orphan (unimported) files in your project! Like that! isn't it nice?

Latest version **1.0.0** (published 2016-10-31) · ASL license · 0 weekly downloads

## Install

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

Provides the command `orphan`.

## 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.0 |
| Published | 2016-10-31 |
| First published | 2016-10-31 |
| Weekly downloads | 0 |
| License | ASL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Gerard Moreno-Torres Bertran |
| Maintainers | germtf |
| Keywords | refactor, orphan, code analysis |

## Links

- npm: https://www.npmjs.com/package/orphan
- npm.io page: https://npm.io/package/orphan

## Dependencies (7)

- [babel-cli](https://npm.io/package/babel-cli.md) ^6.18.0
- [untildify](https://npm.io/package/untildify.md) ^3.0.2
- [filewalker](https://npm.io/package/filewalker.md) ^0.1.3
- [micromatch](https://npm.io/package/micromatch.md) ^2.3.11
- [contains-path](https://npm.io/package/contains-path.md) ^0.1.0
- [command-line-args](https://npm.io/package/command-line-args.md) ^3.0.1
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.18.0

## Recent versions

- 1.0.0 (latest) — 2016-10-31

## README

# orphan

Find orphan (unimported) files in your project! Like that! isn't it nice?

Just `cd` to the root folder of your application and run `orphan`. There is a sensitive bunch of default parameters which you can override via cli or with a config file called `.orphanrc` (also located at the root folder of your  application). Here is an example of an `.orphanrc` (which also happens to be the default config):

```javascript
module.exports = {
  rootDir: '.',
  tilde: '.',
  entryFiles: [
    './index.js'
  ],
  uses: [
    '**/*.js'
  ],
  ignores: [
    '**/*.test.js',
    '**/*.spec.js',
    '**/*.config.js',
    '**/*.babel.js',
    'node_modules',
    '.git',
    'gulp',
    'dist'
  ]

}
```

In case you are not familiar with it, `tilde` refers to the path used by `babel-plugin-require-root-rewrite`, so it's an optional parameter.

You can also use the following arguments to override `.orphanrc` and the default config:

| arg        | long         | short | type           |
|------------|--------------|-------|----------------|
| rootDir    | --rootDir    | -r    | String         |
| tilde      | --tilde      | -t    | String         |
| entryFiles | --entryFiles | -e    | Array<String>  |
| uses       | --uses       | -u    | Array<String>  |
| ignores    | --ignores    | -i    | Array<Strings> |

For example, to also use css files you could use:
```bash
orphan -u '**/*/js' '**/*/css'
```

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