Skip to content

Commit e72611c

Browse files
committed
chore: add readme
1 parent 777e679 commit e72611c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,39 @@
22

33
reload nodejs modules with [batchdelcache](https://github.com/NoCoreNode/batchdelcache)
44

5+
6+
[![Build Status](https://travis-ci.org/NoCoreNode/reload-modules.svg?branch=master)](https://travis-ci.org/NoCoreNode/reload-modules)
7+
[![Coverage Status](https://coveralls.io/repos/github/NoCoreNode/reload-modules/badge.svg?branch=master)](https://coveralls.io/github/NoCoreNode/reload-modules?branch=master)
8+
9+
## Installation
10+
11+
```bash
12+
# use npm
13+
npm install reload-modules
14+
# or use yarn
15+
yarn add reload-modules
16+
```
17+
18+
## Environment
19+
20+
Node.js 10+
21+
22+
## Usage
23+
24+
```js
25+
import Reloader from 'reload-modules';
26+
27+
const reloader = new Reloader({
28+
fileMap: {
29+
mod1: 'abcd',
30+
mod2: 'efcg',
31+
},
32+
context: resolve(__dirname, './fixtures'),
33+
commonRootPath: resolve(__dirname, './fixtures/mainModule.js'),
34+
});
35+
36+
reloader.reload({
37+
mod1: 'xxxx',
38+
mod2: 'xxxx',
39+
});
40+
```

0 commit comments

Comments
 (0)