# component-scan

> A simple react component scanner

Latest version **0.0.11** (published 2015-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install component-scan
pnpm add component-scan
yarn add component-scan
bun add component-scan
```

Provides the command `component-scan`.

## 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.11 |
| Published | 2015-10-16 |
| First published | 2015-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jack Herrington |
| Maintainers | walmartreact |

## Links

- npm: https://www.npmjs.com/package/component-scan
- Repository: https://github.com/walmartreact/component-scan
- Homepage: https://github.com/walmartreact/component-scan#readme
- Issues: https://github.com/walmartreact/component-scan/issues
- npm.io page: https://npm.io/package/component-scan

## Dependencies (5)

- [glob](https://npm.io/package/glob.md) ^5.0.15
- [async](https://npm.io/package/async.md) ^1.4.2
- [babel](https://npm.io/package/babel.md) ^5.8.23
- [commander](https://npm.io/package/commander.md) ^2.8.1
- [line-by-line](https://npm.io/package/line-by-line.md) ^0.1.4

## Recent versions

- 0.0.11 (latest) — 2015-10-16
- 0.0.10 — 2015-10-16
- 0.0.9 — 2015-10-15
- 0.0.8 — 2015-10-15
- 0.0.7 — 2015-10-14
- 0.0.6 — 2015-10-13
- 0.0.5 — 2015-10-12
- 0.0.4 — 2015-10-12
- 0.0.3 — 2015-10-12
- 0.0.2 — 2015-10-12
- 0.0.1 — 2015-10-11

## README

React Component Scanner
=======================

A very simple component scanner that uses the Babel
AST to find all of the component references from a
projects JSX files.

## Installation

```
npm install component-scan
```

## Usage

```
component-scan -s src -o components.json
```

## Example usage

```
node index.js -s examples
```

## Caveats

This assumes that the client of a component doesn't rename the component.
For example, this would probably be good:

```
var Footer = require('my-footer');
...
  render() {
    return (
      <Footer />
    );
  }
```

But this:

```
var Footer = require('my-footer');
...
  render() {
    var A = Footer;
    return (
      <A />
    );
  }
```

Is going to say that you are referencing the `A` component. And this:

```
var MyNameForFooter = require('my-footer');
...
  render() {
    return (
      <MyNameForFooter />
    );
  }
```

Is going to say that you are referencing `MyNameForFooter`. So... don't do that.

## License

Licensed under [MIT](https://opensource.org/licenses/MIT).

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