Skip to content

Commit

Permalink
fix: copy readme from root during deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Nov 20, 2024
1 parent f1d9726 commit cece0c8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sdk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ dist

node_modules
tsconfig*.tsbuildinfo
.DS_Store
.DS_Store
README.md
11 changes: 11 additions & 0 deletions packages/sdk/prepare-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if (!version) {
}

const packageJsonPath = path.resolve("./package.json");
const readmePath = path.resolve("../../README.md"); // copy readme into current path

async function preparePackageJson() {
try {
Expand All @@ -32,4 +33,14 @@ async function preparePackageJson() {
}
}

async function copyReadme() {
try {
await fs.copyFile(readmePath, path.resolve("./README.md"));
} catch (error) {
console.error("Error copying README.md:", error);
process.exit(1);
}
}

preparePackageJson();
copyReadme();

0 comments on commit cece0c8

Please sign in to comment.