( directory: string, packageJson: PackageJson = DEFAULT_PACKAGE_JSON, )
| 240 | }; |
| 241 | |
| 242 | export const createEmptyPackage = ( |
| 243 | directory: string, |
| 244 | packageJson: PackageJson = DEFAULT_PACKAGE_JSON, |
| 245 | ) => { |
| 246 | const packageJsonWithDefaults = { |
| 247 | ...packageJson, |
| 248 | description: 'THIS IS AN AUTOGENERATED FILE AND SHOULD NOT BE ADDED TO GIT', |
| 249 | }; |
| 250 | fs.mkdirSync(directory, {recursive: true}); |
| 251 | fs.writeFileSync( |
| 252 | path.resolve(directory, 'package.json'), |
| 253 | JSON.stringify(packageJsonWithDefaults, null, 2), |
| 254 | ); |
| 255 | }; |
| 256 | |
| 257 | export const extractSummary = (stdout: string) => { |
| 258 | const match = stdout |
no test coverage detected