From d1fd317e32af0fc9715b8483010280ab3f1cc399 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Tue, 7 Jan 2025 01:12:08 +0000 Subject: [PATCH] yarn-plugin: document local development of yarn plugin Signed-off-by: MT Lewis --- packages/yarn-plugin/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/yarn-plugin/README.md b/packages/yarn-plugin/README.md index 67ea19b1bd..c1d5647b8e 100644 --- a/packages/yarn-plugin/README.md +++ b/packages/yarn-plugin/README.md @@ -24,3 +24,17 @@ The resulting changes in the file system should be committed to your repo. The yarn plugin recognizes the version string `"backstage:^"`, and replaces it with the appropriate version based on the overall Backstage version in backstage.json. + +## Local Development + +- Run unit tests: `yarn test` +- Build the plugin locally: `yarn build` +- Rebuild whenever plugin files change: `yarn start` +- Install local build (in a package directory outside the Backstage monorepo): + `yarn plugin import +/path/to/backstage-repo/packages/yarn-plugin/bundles/@yarnpkg/plugin-backstage.js` + +The plugin can be manually tested in any repository running at least yarn 4.1.1. +Sadly it can't be manually tested directly in the Backstage monorepo - since +packages in this repository use `workspace:^` dependencies, there's no use case +for the yarn plugin.