You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# istanbul-loader
2
2
3
-
This is a webpack loader that uses [istanbul-lib-instrument](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-instrument) to add code coverage instrumentation to JavaScript files.
Install the loader in a project and add an entry for it to the project's webpack.config:
17
+
Install the loader in a project and add an entry for it to the project's
18
+
webpack.config:
16
19
17
20
```js
18
21
module: {
@@ -26,7 +29,9 @@ module: {
26
29
}
27
30
```
28
31
29
-
Note that the istanbul-loader should be run _after_ transpilers such as TypeScript. This means that it should come _before_ transpilers in a loader list, or use `enforce: 'post'`:
32
+
Note that the istanbul-loader should be run _after_ transpilers such as
33
+
TypeScript. This means that it should come _before_ transpilers in a loader
34
+
list, or use `enforce: 'post'`:
30
35
31
36
```js
32
37
rules: [
@@ -53,7 +58,8 @@ rules: [
53
58
54
59
## Configuration
55
60
56
-
The rule test should only match source files, not all `.ts` or `.js` files, so as not to instrument tests or support files.
61
+
The rule test should only match source files, not all `.ts` or `.js` files, so
62
+
as not to instrument tests or support files.
57
63
58
64
Options can be passed using the standard webpack `options` property:
59
65
@@ -70,4 +76,15 @@ rules: [
70
76
]
71
77
```
72
78
73
-
Currently the only option used by the loader is 'config', which should point to an [Intern config file](https://github.com/theintern/intern/blob/master/docs/configuration.md#config-file). The loader will use values for `coverageVariable` and `instrumenterOptions` from the Intern config, if present.
79
+
Currently the only option used by the loader is 'config', which should point to
0 commit comments