1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | const modifyPackageJson = ({projectPackageJson, shouldModifyScripts}) => {
|
15 | if (shouldModifyScripts) {
|
16 | projectPackageJson.scripts
|
17 | ? (projectPackageJson.scripts.test = 'jest')
|
18 | : (projectPackageJson.scripts = {
|
19 | test: 'jest'
|
20 | });
|
21 | }
|
22 |
|
23 | delete projectPackageJson.jest;
|
24 | return JSON.stringify(projectPackageJson, null, 2) + '\n';
|
25 | };
|
26 |
|
27 | var _default = modifyPackageJson;
|
28 | exports.default = _default;
|