source: frontend/node_modules/@istanbuljs/load-nyc-config/README.md

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 2.1 KB
Line 
1# @istanbuljs/load-nyc-config
2
3The utility function which NYC uses to load configuration.
4This can be used by outside programs to calculate the configuration.
5Command-line arguments are not considered by this function.
6
7```js
8const {loadNycConfig} = require('@istanbuljs/load-nyc-config');
9
10(async () {
11 console.log(await loadNycConfig());
12})();
13```
14
15## loadNycConfig([options])
16
17### options.cwd
18
19Type: `string`
20Default: `cwd` from parent nyc process or `process.cwd()`
21
22### options.nycrcPath
23
24Type: `string`
25Default: `undefined`
26
27Name of the file containing nyc configuration.
28This can be a relative or absolute path.
29Relative paths can exist at `options.cwd` or any parent directory.
30If an nycrc is specified but cannot be found an exception is thrown.
31
32If no nycrc option is provided the default priority of config files are:
33
34* .nycrc
35* .nycrc.json
36* .nycrc.yml
37* .nycrc.yaml
38* nyc.config.js
39* nyc.config.cjs
40* nyc.config.mjs
41
42## Configuration merging
43
44Configuration is first loaded from `package.json` if found, this serves as the package
45defaults. These options can be overridden by an nycrc if found. Arrays are not merged,
46so if `package.json` sets `"require": ["@babel/register"]` and `.nycrc` sets `"require": ["esm"]`
47the effective require setting will only include `"esm"`.
48
49## isLoading
50
51```js
52const {isLoading} = require('@istanbuljs/load-nyc-config');
53
54console.log(isLoading());
55```
56
57In some cases source transformation hooks can get installed before the configuration is
58loaded. This allows hooks to ignore source loads that occur during configuration load.
59
60## `@istanbuljs/load-nyc-config` for enterprise
61
62Available as part of the Tidelift Subscription.
63
64The maintainers of `@istanbuljs/load-nyc-config` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-istanbuljs-load-nyc-config?utm_source=npm-istanbuljs-load-nyc-config&utm_medium=referral&utm_campaign=enterprise)
Note: See TracBrowser for help on using the repository browser.