File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
reload nodejs modules with [ batchdelcache] ( https://github.com/NoCoreNode/batchdelcache )
4
4
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
+ ```
You can’t perform that action at this time.
0 commit comments