nx/scripts/copy-readme.js
Jack Hsu f221a41dbd
feat(misc): remove @nrwl/ scoped packages (#27858)
This PR removes the `@nrwl/*` packages. Also cleans up references to the
legacy packages.

NOTE: The rescope page is now under `/deprecated/rescope`. There is
still >1000K monthly traffic to it, which might be due to older Nx
users.

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-09-27 17:19:01 -04:00

27 lines
654 B
JavaScript

const fs = require('fs');
const p = process.argv[2];
let sourceReadmePath = `packages/${p}/README.md`;
// we need exception for linter
if (p === 'linter') {
sourceReadmePath = 'packages/eslint/README.md';
}
let r = fs.readFileSync(sourceReadmePath).toString();
r = r.replace(
`{{links}}`,
fs.readFileSync('scripts/readme-fragments/links.md')
);
r = r.replace(
`{{content}}`,
fs.readFileSync('scripts/readme-fragments/content.md')
);
r = r.replace(
`{{resources}}`,
fs.readFileSync('scripts/readme-fragments/resources.md')
);
console.log('WRITING', `build/packages/${p}/README.md`);
fs.writeFileSync(`build/packages/${p}/README.md`, r);