# auto-export-plugin

> webpack auto export

Latest version **1.2.0** (published 2019-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install auto-export-plugin
pnpm add auto-export-plugin
yarn add auto-export-plugin
bun add auto-export-plugin
```

## 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.2.0 |
| Published | 2019-06-24 |
| First published | 2019-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | layne_s@163.com |
| Maintainers | christo0625 |
| Keywords | webpack-plugin-auto-export, auto-export |

## Links

- npm: https://www.npmjs.com/package/auto-export-plugin
- Repository: https://github.com/layne0625/auto-export-plugin
- Homepage: https://github.com/layne0625/auto-export-plugin#readme
- Issues: https://github.com/layne0625/auto-export-plugin/issues
- npm.io page: https://npm.io/package/auto-export-plugin

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [chokidar](https://npm.io/package/chokidar.md) ^3.0.1
- [babel-types](https://npm.io/package/babel-types.md) ^6.26.0
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.4.5
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.4.5
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.4.4

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2019-06-24
- 1.1.0 — 2019-06-23
- 1.0.6 — 2019-06-20
- 1.0.5 — 2019-06-20
- 1.0.4 — 2019-06-19
- 1.0.3 — 2019-06-18
- 1.0.2 — 2019-06-18
- 1.0.1 — 2019-06-18
- 1.0.0 — 2019-06-18

## README

![](https://github.com/layne0625/auto-export-plugin/blob/master/screenshot/pic.gif)
## Introduction
文件改动或删除时，自动收集文件中的export语句， 并在index.js文件中导出

- 如果是非index.js文件改动会自动写入同级目录index.js文件中
- 如果是index.js文件改动会自动写入上层目录的index.js文件中(*如果不需要此特性，可以在ignored中写入/index/忽略*)


## Install
```
npm i auto-export-plugin -D
```


## Usage
```javascript
// webpack.config.js
...
const AutoExport = require('auto-export')

module.exports = {
  ...
  plugins: [
    ...
    new AutoExport({
      dir: ['src', 'constant'],
      ignored: /someFileName|someDirName/
    })
  ]
}

```

## Options
- dir (string/array):  需要监听的目录名,  默认为src目录
- ignored (regexp): 过滤掉的文件名、目录名

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