()
| 51 | } |
| 52 | |
| 53 | async function updateMonorepoFile() { |
| 54 | const packages = await getSortedPackages(); |
| 55 | const markdownTable = updateTable(packages); |
| 56 | const monorepoFilePath = path.join(MONOREPO_FILE_DIST, MONOREPO_FILE_NAME); |
| 57 | |
| 58 | const content = [ |
| 59 | '<!-- Do not edit this file. It is automatically generated by update-monorepo-file script -->', |
| 60 | '', |
| 61 | '# Monorepo overview', |
| 62 | '', |
| 63 | 'The [loopback-next](https://github.com/loopbackio/loopback-next) repository uses', |
| 64 | '[lerna](https://lernajs.io/) to manage multiple packages for LoopBack 4.', |
| 65 | '', |
| 66 | 'Please run the following command to update packages information after adding new', |
| 67 | 'one in the monorepo: `npm run update-monorepo-file`', |
| 68 | '', |
| 69 | markdownTable, |
| 70 | '', |
| 71 | 'We use npm scripts declared in', |
| 72 | '[package.json](https://github.com/loopbackio/loopback-next/blob/master/package.json)', |
| 73 | 'to work with the monorepo managed by lerna. See', |
| 74 | '[Developing LoopBack](./DEVELOPING.md) for more details.', |
| 75 | ].join('\n'); |
| 76 | |
| 77 | fse.writeFileSync(monorepoFilePath, content + '\n', {encoding: 'utf-8'}); |
| 78 | } |
| 79 | |
| 80 | module.exports = updateMonorepoFile; |
| 81 |
nothing calls this directly
no test coverage detected