Skip to content

Commit

Permalink
feat: Option for cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
iFaxity committed Nov 26, 2021
1 parent beb4a55 commit ab1c2f8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ Creates the vite plugin from a set of optional plugin options.
**Returns:** Vite Plugin

#### Parameters
* `opts {IstanbulPluginOptions}` - Object of optional options to pass to the plugin
* `opts.include {string|string[]}` - Optional string or array of strings of glob patterns to include
* `opts.exclude {string|string[]}` - Optional string or array of strings of glob patterns to exclude
* `opts.extension {string|string[]}` - Optional string or array of strings of extensions to include (dot prefixed like .js or .ts). By default this is set to `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue']`
* `opts.requireEnv {boolean}` - Optional boolean to require env to be true to instrument to code, otherwise it will instrument even if env variable is not set
* `opts.cypress {boolean}` - Optional boolean to change the env to CYPRESS_COVERAGE instead of VITE_COVERAGE. For ease of use with @cypress/code-coverage
* `opts.checkProd {boolean}` - Optional boolean to enforce the plugin to skip instrumentation for production environments, checks NODE_ENV for "production" (case insensitive). Defaults to true`
* `opts {IstanbulPluginOptions}` - Object of optional options to pass to the plugin.
* `opts.cwd {string}` - Optional string of the current working directory, used for the include/exclude patterns. Defaults to process.cwd().
* `opts.include {string|string[]}` - Optional string or array of strings of glob patterns to include.
* `opts.exclude {string|string[]}` - Optional string or array of strings of glob patterns to exclude.
* `opts.extension {string|string[]}` - Optional string or array of strings of extensions to include (dot prefixed like .js or .ts). By default this is set to `['.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', '.vue']`.
* `opts.requireEnv {boolean}` - Optional boolean to require env to be true to instrument to code, otherwise it will instrument even if env variable is not set.
* `opts.cypress {boolean}` - Optional boolean to change the env to CYPRESS_COVERAGE instead of VITE_COVERAGE. For ease of use with @cypress/code-coverage.
* `opts.checkProd {boolean}` - Optional boolean to enforce the plugin to skip instrumentation for production environments, checks *NODE_ENV* for "production" (case insensitive). Defaults to true.

Examples
--------------------------
Expand Down

0 comments on commit ab1c2f8

Please sign in to comment.