Skip to content

Commit

Permalink
fix(misc): publish legacy readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed May 1, 2023
1 parent e7229d1 commit d7d5685
Show file tree
Hide file tree
Showing 24 changed files with 122 additions and 24 deletions.
9 changes: 8 additions & 1 deletion packages-legacy/angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@
"dependsOn": ["build-ng", "build-base", "^build"],
"executor": "nx:run-commands",
"options": {
"command": "echo 'Built angular-legacy'"
"commands": [
{
"command": "node ./scripts/copy-readme.js angular-legacy"
},
{
"command": "echo 'Built angular-legacy'"
}
]
}
}
},
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/cypress/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js cypress-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/cypress/index.ts",
"tsConfig": "packages-legacy/cypress/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/detox/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js detox-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/detox/index.ts",
"tsConfig": "packages-legacy/detox/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/devkit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js devkit-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/devkit/index.ts",
"tsConfig": "packages-legacy/devkit/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/esbuild/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js esbuild-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/esbuild/index.ts",
"tsConfig": "packages-legacy/esbuild/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/eslint-plugin-nx/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js eslint-plugin-nx-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/eslint-plugin-nx/index.ts",
"tsConfig": "packages-legacy/eslint-plugin-nx/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/expo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js expo-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/expo/index.ts",
"tsConfig": "packages-legacy/expo/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/express/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js express-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/express/index.ts",
"tsConfig": "packages-legacy/express/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/jest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js jest-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/jest/index.ts",
"tsConfig": "packages-legacy/jest/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js js-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/js/index.ts",
"tsConfig": "packages-legacy/js/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/linter/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js linter-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/linter/index.ts",
"tsConfig": "packages-legacy/linter/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/nest/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js nest-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/nest/index.ts",
"tsConfig": "packages-legacy/nest/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/next/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js next-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/next/index.ts",
"tsConfig": "packages-legacy/next/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/node/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js node-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/node/index.ts",
"tsConfig": "packages-legacy/node/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/nx-plugin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js nx-plugin-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/nx-plugin/index.ts",
"tsConfig": "packages-legacy/nx-plugin/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/react-native/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js react-native-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/react-native/index.ts",
"tsConfig": "packages-legacy/react-native/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js react-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/react/index.ts",
"tsConfig": "packages-legacy/react/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/rollup/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js rollup-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/rollup/index.ts",
"tsConfig": "packages-legacy/rollup/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/storybook/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js storybook-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/storybook/index.ts",
"tsConfig": "packages-legacy/storybook/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/vite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js vite-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/vite/index.ts",
"tsConfig": "packages-legacy/vite/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js web-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/web/index.ts",
"tsConfig": "packages-legacy/web/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/webpack/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js webpack-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/webpack/index.ts",
"tsConfig": "packages-legacy/webpack/tsconfig.json",
Expand Down
6 changes: 5 additions & 1 deletion packages-legacy/workspace/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["build"],
"command": "node ./scripts/copy-readme.js workspace-legacy"
},
"build:base": {
"executor": "@nx/js:tsc",
"dependsOn": ["^build"],
"dependsOn": ["^build:base"],
"options": {
"main": "packages-legacy/workspace/index.ts",
"tsConfig": "packages-legacy/workspace/tsconfig.json",
Expand Down
5 changes: 4 additions & 1 deletion scripts/copy-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ const fs = require('fs');

const p = process.argv[2];

let r = fs.readFileSync(`packages/${p}/README.md`).toString();
const sourceReadmePath = !p.endsWith('-legacy')
? `packages/${p}/README.md`
: `packages-legacy/${p.replace('-legacy', '')}/README.md`;
let r = fs.readFileSync(sourceReadmePath).toString();
r = r.replace(
`{{links}}`,
fs.readFileSync('scripts/readme-fragments/links.md')
Expand Down

0 comments on commit d7d5685

Please sign in to comment.