From 60b0a00981f2cd1ffc4457dcc32ee7b3f5093586 Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Wed, 25 Sep 2024 19:59:16 +0200 Subject: [PATCH] Add brief `README.md` guide --- openrewrite/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 openrewrite/README.md diff --git a/openrewrite/README.md b/openrewrite/README.md new file mode 100644 index 00000000..584d9e3d --- /dev/null +++ b/openrewrite/README.md @@ -0,0 +1,15 @@ +## Development Setup + +For the time being the setup is unfortunately a bit complicated due to the dependencies between `rewrite-javascript` and `rewrite-remote`. +To be able to make changes to both these projects and make sure that they work together, we use `npm link`. + +1. Start by cloning both `openrewrite/rewrite-javascript` (this repo) and `moderneinc/rewrite-remote` +2. For both repos perform the following steps: + 1. Run the build using `npm run build` + 2. Copy the `package.json` file to the `dist` folder + 3. Go into the `dist` folder and run `npm link` + 4. This last step only needs to be done once +3. Now `npm link` needs to be run in either project to link it into `node_modules`: + 1. For `openrewrite/rewrite-javascript` run `npm link @openrewrite/rewrite-remote` + 2. For `moderneinc/rewrite-remote` run `npm link @openrewrite/rewrite` +4. Now you are basically all set. As the tests read the production source files from `dist` instead of `src` it is recommended to have `tsc --watch` running which you can do using `npm run dev`