1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| 'use strict'
|
| function getInvalidatingOptions (config) {
| return [
| 'compact',
| 'esModules',
| 'ignoreClassMethods',
| 'instrument',
| 'instrumenter',
| 'parserPlugins',
| 'preserveComments',
| 'produceSourceMap',
| 'sourceMap'
| ].reduce((acc, optName) => {
| acc[optName] = config[optName]
| return acc
| }, {})
| }
|
| module.exports = {
| salt (config) {
| return JSON.stringify({
| modules: {
| 'istanbul-lib-instrument': require('istanbul-lib-instrument/package.json').version,
| nyc: require('../package.json').version
| },
| nycrc: getInvalidatingOptions(config)
| })
| }
| }
|
|