From 624046a77243847463ba16027645733c7a10c323 Mon Sep 17 00:00:00 2001 From: Dominik Wilkowski Date: Fri, 13 Aug 2021 11:41:42 +1000 Subject: [PATCH 1/3] Added RFC to simplify monorepo --- RFCs/1-approved/monorepo.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 RFCs/1-approved/monorepo.md diff --git a/RFCs/1-approved/monorepo.md b/RFCs/1-approved/monorepo.md new file mode 100644 index 0000000..8698bc9 --- /dev/null +++ b/RFCs/1-approved/monorepo.md @@ -0,0 +1,19 @@ +--- +Status: `Proposal` # Please do not change this. +Implementer: # It will be changed upon merging and as it moves through the RFC stages +--- + +# Simplify the monorepo + +## The issue to be solved + +The tool [lerna](https://lerna.js.org/) we have been using to power the monorepo has become incredibly slow and difficult to deal with. +We need to simplify the structure to allow us to fix things faster. + +## A short description of the solution + +I propose we remove lerna, move to [yarn v1 workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) and de-tangle the reasons the `bootstrap` process is currently so dependent on a very specific order at which what dependency has to be installed. + +## Technical details + +TODO 😬 From d07779f6ebaaab55abda4de7779fdf1d8a03bb7f Mon Sep 17 00:00:00 2001 From: Dominik Wilkowski Date: Tue, 14 Dec 2021 14:12:26 +1100 Subject: [PATCH 2/3] finished monorepo RFC --- RFC-by-stage/1-approved/monorepo.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/RFC-by-stage/1-approved/monorepo.md b/RFC-by-stage/1-approved/monorepo.md index 8698bc9..c6bb9bc 100644 --- a/RFC-by-stage/1-approved/monorepo.md +++ b/RFC-by-stage/1-approved/monorepo.md @@ -12,8 +12,29 @@ We need to simplify the structure to allow us to fix things faster. ## A short description of the solution -I propose we remove lerna, move to [yarn v1 workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) and de-tangle the reasons the `bootstrap` process is currently so dependent on a very specific order at which what dependency has to be installed. +I propose we remove lerna, move to [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) +and de-tangle the reasons the `bootstrap` process is currently so dependent on a very specific order +at which what dependency has to be installed. ## Technical details -TODO 😬 +This RFC depends on [Remove pancake #1](https://github.com/designsystemau/RFCs/pull/1). + +Once we have done away with the build of pancake we can de-tangle the install process and since there won't +be any more `postinstall` scripts per component we will be able to install the dependencies per component +without having to worry about the order of what is installed when. + +We will still have the test sites we have now running as those do not require any changes and don't depend on anything. +That means we can leave the testing infrastructure in place which is good. + +It does however also include the inclusion of the below tools: + +- [prettier](https://prettier.io/) +- [manypkgs](https://github.com/Thinkmill/manypkg) +- [preconstruct](https://preconstruct.tools/) +- The docs website + +The docs website will be included into this monorepo so that docs are drawn from the readme of each component. +That way we won't have to deal duplicating docs in two places. + +This depends on [Docs site improvements #4](https://github.com/designsystemau/RFCs/pull/4). From 18258e57ca3f6bf0176929dc9f73cfa68f63080f Mon Sep 17 00:00:00 2001 From: Dominik Wilkowski Date: Tue, 14 Dec 2021 14:19:06 +1100 Subject: [PATCH 3/3] added folder strucutre --- RFC-by-stage/1-approved/monorepo.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/RFC-by-stage/1-approved/monorepo.md b/RFC-by-stage/1-approved/monorepo.md index c6bb9bc..6e1551b 100644 --- a/RFC-by-stage/1-approved/monorepo.md +++ b/RFC-by-stage/1-approved/monorepo.md @@ -38,3 +38,22 @@ The docs website will be included into this monorepo so that docs are drawn from That way we won't have to deal duplicating docs in two places. This depends on [Docs site improvements #4](https://github.com/designsystemau/RFCs/pull/4). + +The structure of the monorepo would look like this then: + +```sh +. +├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── DEVELOPING.md +├── LICENSE +├── README.md +├── SUPPORT.md +├── auds.json +├── docs +│ └── ... (the docs site published at https://gold.designsystemau.org) +├── package-lock.json +├── package.json +└── packages + └── ... (a directory per component) +```