# auto-import-module

> auto import module

Latest version **1.0.12** (published 2021-06-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install auto-import-module
pnpm add auto-import-module
yarn add auto-import-module
bun add auto-import-module
```

## 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.12 |
| Published | 2021-06-03 |
| First published | 2021-05-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | deepFish |
| Maintainers | maweimaweima |
| Keywords | auto, import, module |

## Links

- npm: https://www.npmjs.com/package/auto-import-module
- Repository: https://github.com/maweimaweima/auto-import-module
- Homepage: https://github.com/maweimaweima/auto-import-module#readme
- Issues: https://github.com/maweimaweima/auto-import-module/issues
- npm.io page: https://npm.io/package/auto-import-module

## Dependencies (4)

- [chokidar](https://npm.io/package/chokidar.md) ^3.5.1
- [cache-io-disk](https://npm.io/package/cache-io-disk.md) ^1.0.0
- [cache-dir-find](https://npm.io/package/cache-dir-find.md) ^1.0.5
- [console-log-cmd](https://npm.io/package/console-log-cmd.md) ^1.0.1

## Recent versions

- 1.0.12 (latest) — 2021-06-03
- 1.0.11 — 2021-06-03
- 1.0.10 — 2021-06-02
- 1.0.8 — 2021-06-02
- 1.0.7 — 2021-06-02
- 1.0.6 — 2021-06-02
- 1.0.5 — 2021-06-01
- 1.0.4 — 2021-06-01
- 1.0.3 — 2021-05-31
- 1.0.2 — 2021-05-31
- 1.0.1 — 2021-05-31
- 1.0.0 — 2021-05-18

## README

# auto-import-module
auto import module

### About
Auto assemble files and directories by using es module.
This tool will auto create default index as directory entry file.
This tool supports .js .ts .scss .less .stylus and so on.

### Install
Install with npm:

`$ npm install --save auto-import-module`

### Examples

```
// js
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.js',
});
// ts
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.ts',
});
// less
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.less',
  importModuleOnly: true,
});
// scss
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.scss',
  importModuleOnly: true,
});
// stylus
autoImportModule({
  dir: path.join(process.cwd(), 'temp'),
  extension: '.styl',
  importModuleOnly: true,
});



```


### options

| option | introduction |
| ------- | ------- |
|   dir      |     set watch root directory    |
|   extension      |     set file type, default .js    |
|   importModuleOnly      |     set no export, only import module, defaul false   |

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