From c846eb144abcf385c4ecdcb5e328c9e43869ffc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Labreuil?= Date: Sun, 24 Nov 2024 11:50:45 +0100 Subject: [PATCH 1/2] chore: update dev instructions to use pnpm --- CONTRIBUTING.md | 9 +-------- README.md | 9 +-------- docs/README.md | 21 +++++++++++---------- docs/content/1.guide/3.contributing.md | 9 +-------- 4 files changed, 14 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fe5dd23b..835576ca3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,19 +39,12 @@ git checkout -b my-new-branch 3. Run `pnpm dev` in Nimbus's root folder to start dev server or `pnpm dev:mocked` to start dev server with `@elkdev@universeodon.com` user. -We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run: - -``` -ni -nr dev -``` - ### Testing Nimbus uses [Vitest](https://vitest.dev). You can run the test suite with: ``` -nr test +pnpm test ``` ### Running PWA on dev server diff --git a/README.md b/README.md index beec7ceea..5dc7952dc 100644 --- a/README.md +++ b/README.md @@ -39,19 +39,12 @@ pnpm run dev `Warning`: you will need `corepack` enabled, check out the [Nimbus Contributing Guide](./CONTRIBUTING.md) for a detailed guide on how to set up the project locally. -We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run: - -``` -ni -nr dev -``` - ### Testing Nimbus uses [Vitest](https://vitest.dev). You can run the test suite with: ``` -nr test +pnpm test ``` ## 📲 PWA diff --git a/docs/README.md b/docs/README.md index 626d716e8..65898d0ed 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Welcome to the Nimbus Docs -The documentation site publishes to https://docs.nimbus.town. We use [Docus](https://docus.dev) to generate the site and deploy through Netlify. +The documentation site publishes to . We use [Docus](https://docus.dev) to generate the site and deploy through Netlify. ## Quickstart @@ -17,17 +17,16 @@ You need the following to contribute to Nimbus's documentation: - Use `nvm install node` to upgrade to the latest version. - Refer to the [nvm docs](https://github.com/nvm-sh/nvm#installing-and-updating) for information on installing `nvm`. - pnpm installed on your machine. [See the pnpm documentation for installation instructions](https://pnpm.io/installation). -- Optionally, install [ni](https://github.com/antfu/ni#ni). See [Local Setup](../README.md#local-setup) for more information. ### Install and Preview 1. [Fork the Nimbus GitHub project](https://github.com/nimbus-town/nimbus/fork) into your own account. 2. Clone your fork to your local machine. See [GitHub's instructions for more information](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository). 3. From your terminal, `cd` to the directory you cloned into (`cd nimbus` by default). -4. Run `pnpm i` or `ni` to install the project dependencies. -5. Run `pnpm --filter nimbus-docs dev` or `nr --filter nimbus-docs dev` to run the development server. +4. Run `pnpm i` to install the project dependencies. +5. Run `pnpm --filter nimbus-docs dev` to run the development server. -Once the server has started up, you can access the live preview at http://localhost:3000/. This preview reloads when you save changes to the documentation. +Once the server has started up, you can access the live preview at . This preview reloads when you save changes to the documentation. ### Contributing @@ -43,13 +42,15 @@ When you are ready to submit work back to the main Nimbus repo, create a pull re 6. Go to your fork of the Nimbus project in your GitHub account. 7. Select the **Pull Request** tab. 8. Select **New Pull Request**. -9. Confirm the repo/branches to compare. - - The base repo should be **nimbus-town/nimbus**. - - The base branch should be **main**. - - The head repository should be your fork. - - Compare branch should be your working branch you want to submit. +9. Confirm the repo/branches to compare. + +- The base repo should be **nimbus-town/nimbus**. +- The base branch should be **main**. +- The head repository should be your fork. +- Compare branch should be your working branch you want to submit. If you don't see four drop-downs, be sure you are comparing across forks. + 10. Add a description of the changes your request makes. 11. Select **Add Pull Request**. diff --git a/docs/content/1.guide/3.contributing.md b/docs/content/1.guide/3.contributing.md index 1528ccfcd..9c90d1624 100644 --- a/docs/content/1.guide/3.contributing.md +++ b/docs/content/1.guide/3.contributing.md @@ -19,19 +19,12 @@ pnpm run dev `Warning`: you will need `corepack` enabled, check out the [Nimbus Contributing Guide](https://github.com/nimbus-town/nimbus/blob/main/CONTRIBUTING.md) for a detailed guide on how to set up the project locally. -We recommend installing [ni](https://github.com/antfu/ni#ni), that will use the right package manager in each of your projects. If `ni` is installed, you can instead run: - -```bash -ni -nr dev -``` - ## Testing Nimbus uses [Vitest](https://vitest.dev). You can run the test suite with: ```bash -nr test +pnpm test ``` ## Translation status From c0ce0d7d08209dc111a1c17f9405cc10ef3ce170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Labreuil?= Date: Mon, 25 Nov 2024 00:52:37 +0100 Subject: [PATCH 2/2] chore: add frozen flag and add troubleshooting + add dependency section --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++-- README.md | 2 +- docs/README.md | 2 +- docs/content/1.guide/3.contributing.md | 2 +- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 835576ca3..eae2833c7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ For guidelines on contributing to the documentation, refer to the [docs README]( ### Finding a way to contribute -Nimbus is still in its early stages, and there are many ways to contribute. If are not sure where to start, check out [this discussion](https://github.com/nimbus-town/nimbus/discussions/23) for some ideas. +Nimbus is still in its early stages, and there are many ways to contribute. If you are not sure where to start, check out [this discussion](https://github.com/nimbus-town/nimbus/discussions/23) for some ideas. ### Online @@ -33,12 +33,36 @@ If you have [nvm](https://github.com/nvm-sh/nvm), you can run `nvm i` to install git checkout -b my-new-branch ``` -1. Run `pnpm i` in Nimbus's root folder +1. Run `pnpm i --frozen-lockfile` in Nimbus's root folder 2. Run `pnpm nuxi prepare` in Nimbus's root folder 3. Run `pnpm dev` in Nimbus's root folder to start dev server or `pnpm dev:mocked` to start dev server with `@elkdev@universeodon.com` user. +#### Troubleshooting + +If you encounter any issues with the installation, we suggest trying the following steps: + +- Reinstall the dependencies: + +1. Remove the `node_modules` folder in Nimbus's root folder +2. If the `pnpm-lock.yaml` file was modified, revert the changes +3. Retry the installation in the root folder with `pnpm i --frozen-lockfile` + +- Check that you are using the correct command to start the dev server: + - `pnpm dev` with `pnpm` + +If the issue persists, please open an issue. + +#### Adding a new dependency + +Since Nimbus is a monorepo using `pnpm` workspace, it's important to add new dependencies using the correct command: + +- for development dependencies: `pnpm add -D -w` +- for production dependencies: `pnpm add -w` + +Alternatively, you can manually add the dependency to the corresponding `package.json` file, and then run `pnpm i` in Nimbus's root folder to install the new dependency. + ### Testing Nimbus uses [Vitest](https://vitest.dev). You can run the test suite with: diff --git a/README.md b/README.md index 5dc7952dc..3a1568caa 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ We're really excited that you're interested in contributing to Nimbus! Before su Clone the repository and run on the root folder: ``` -pnpm i +pnpm i --frozen-lockfile pnpm run dev ``` diff --git a/docs/README.md b/docs/README.md index 65898d0ed..475d9ae25 100644 --- a/docs/README.md +++ b/docs/README.md @@ -23,7 +23,7 @@ You need the following to contribute to Nimbus's documentation: 1. [Fork the Nimbus GitHub project](https://github.com/nimbus-town/nimbus/fork) into your own account. 2. Clone your fork to your local machine. See [GitHub's instructions for more information](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository). 3. From your terminal, `cd` to the directory you cloned into (`cd nimbus` by default). -4. Run `pnpm i` to install the project dependencies. +4. Run `pnpm i --frozen-lockfile` to install the project dependencies. 5. Run `pnpm --filter nimbus-docs dev` to run the development server. Once the server has started up, you can access the live preview at . This preview reloads when you save changes to the documentation. diff --git a/docs/content/1.guide/3.contributing.md b/docs/content/1.guide/3.contributing.md index 9c90d1624..603301b34 100644 --- a/docs/content/1.guide/3.contributing.md +++ b/docs/content/1.guide/3.contributing.md @@ -13,7 +13,7 @@ You can use [StackBlitz Codeflow](https://stackblitz.com/codeflow) to fix bugs o Clone the repository and run on the root folder: ```bash -pnpm i +pnpm i --frozen-lockfile pnpm run dev ```