diff --git a/README.md b/README.md index a16f84a..cf746ae 100644 --- a/README.md +++ b/README.md @@ -39,21 +39,21 @@ export default { **The available options if your project uses Webpack5 are as follows:** -| Option name | Description | Type | Default | -| ---------------------- | -------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------ | -| `cwd` | Set the working directory | `String` | `process.cwd()` | -| `nycrcPath` | Path to specific nyc config to use instead of automatically searching for a nycconfig. | `string` | - | -| `include` | Glob pattern to include files. It has precedence over the include definition from your nyc config | `Array` | - | -| `exclude` | Glob pattern to exclude files. It has precedence over the exclude definition from your nyc config | `Array` | - | -| `extension` | List of supported extensions. It has precedence over the extension definition from your nyc config | `Array` | `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte]` | -| `coverageVariable` | The global variable name that Istanbul will use to store coverage results. | `string` | - | -| `preserveComments` | Indicates whether comments in the code should be preserved during the instrumentation process. | `boolean` | `true` | -| `compact` | Controls whether the output of instrumented code is compacted. Useful for debugging when set to `false`. | `boolean` | `false` | -| `esModules` | Determines whether the code to be instrumented uses ES Module syntax. | `boolean` | `true` | -| `autoWrap` | When set to `true`, wraps program code in a function to enable top-level return statements. | `boolean` | `true` | -| `produceSourceMap` | If `true`, instructs Istanbul to produce a source map for the instrumented code. | `boolean` | `true` | -| `sourceMapUrlCallback` | A callback function that gets invoked with the filename and the source map URL when a source map is generated. | `function` | - | -| `debug` | Enables the debug mode, providing additional logging information during the instrumentation process. | `boolean` | - | +| Option name | Description | Type | Default | +| ---------------------- | -------------------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------- | +| `cwd` | Set the working directory | `String` | `process.cwd()` | +| `nycrcPath` | Path to specific nyc config to use instead of automatically searching for a nycconfig. | `string` | - | +| `include` | Glob pattern to include files. It has precedence over the include definition from your nyc config | `Array` | - | +| `exclude` | Glob pattern to exclude files. It has precedence over the exclude definition from your nyc config | `Array` | `defaultExclude` in https://github.com/storybookjs/addon-coverage/blob/main/src/constants.ts | +| `extension` | List of supported extensions. It has precedence over the extension definition from your nyc config | `Array` | `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue', '.svelte]` | +| `coverageVariable` | The global variable name that Istanbul will use to store coverage results. | `string` | - | +| `preserveComments` | Indicates whether comments in the code should be preserved during the instrumentation process. | `boolean` | `true` | +| `compact` | Controls whether the output of instrumented code is compacted. Useful for debugging when set to `false`. | `boolean` | `false` | +| `esModules` | Determines whether the code to be instrumented uses ES Module syntax. | `boolean` | `true` | +| `autoWrap` | When set to `true`, wraps program code in a function to enable top-level return statements. | `boolean` | `true` | +| `produceSourceMap` | If `true`, instructs Istanbul to produce a source map for the instrumented code. | `boolean` | `true` | +| `sourceMapUrlCallback` | A callback function that gets invoked with the filename and the source map URL when a source map is generated. | `function` | - | +| `debug` | Enables the debug mode, providing additional logging information during the instrumentation process. | `boolean` | - | > **Note:** > If you're using typescript, you can import the type for the options like so: