fix: copy root README during xrpl publish (#2530)

The `xrpl` package had a less than helpful docs when viewed on the npm
website. The fix is a workaround that copies the root `README` over
to `packages/xrpl/README.md` during the `prepare` lifecycle phase.
This commit is contained in:
Caleb Kniffen
2023-10-18 10:38:00 -05:00
committed by GitHub
parent 65bf5d40ea
commit 8b78147945
3 changed files with 4 additions and 8 deletions

3
packages/xrpl/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Replaced by root README during the prepare lifecycle phase because npm does not allow symlinking README files
# https://docs.npmjs.com/cli/v7/using-npm/scripts#npm-publish
README.md

View File

@@ -1,8 +0,0 @@
# xrpl.js
This package includes the `xrpl` library. This repository uses a monorepo
layout. Please find the README for `xrpl` [here](https://github.com/XRPLF/xrpl.js/tree/main/README.md).
READMEs for other packages in this monorepo are located at the root of their
package, but since newcomers to XRPL are likely to want to use the `xrpl`
package this README is at the root of the project.

View File

@@ -62,6 +62,7 @@
"watch": "run-s build:lib --watch",
"clean": "rm -rf dist build coverage",
"docgen": "tsc --build tsconfig.docs.json && typedoc && echo js.xrpl.org >> ../../docs/CNAME",
"prepare": "copyfiles ../../README.md xrpl/README.md",
"prepublish": "run-s clean build",
"test": "jest --config=jest.config.unit.js --verbose false --silent=false",
"test:integration": "TS_NODE_PROJECT=tsconfig.build.json jest --config=jest.config.integration.js --verbose false --silent=false --runInBand",