diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53b9e7af..2d76cc27 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,24 +9,68 @@ sure you follow the steps below: - Make sure you are not adding any merge commits to your branch - Open a pull request & wait for a review!🩵 -## Developing environment +## Setting Up Your Build Environment -After installing all dependencies with `yarn`, you can run + + +### Build Requirements + +To build Vivify you need the following dependencies:- + +#### Arch Linux/Manjaro: +``` +sudo pacman -S --needed jq yarn make zip +``` + +#### Fedora and derivatives +``` +sudo dnf install jq yarn make zip +``` + +> [!TIP] +> TODO: Mention linux nodejs issue and refer to following section on nodejs + +## Nodejs + +***TODO: Talk about nodejs linux broken etc.*** + +## Building Vivify + +***TODO: Take build steps from readme.md*** + +## Running Vivify for Development + +Once you have built **Vivify** or installed it using the pre-built binaries, you +can then run the **Vivify** server in development mode to try it out with +live-updates as you are coding. + +Using `yarn dev` to run **Vivify** in dev mode will:- + +1. Run `vivify-server` on port `3000` instead of the usual port of `31622` so they + can be run side by side; +2. Automatically reload when you make changes to the code; and +3. Unlike the installed version, not shut down when there are no connected clients. ```sh +# Run yarn to update any nodejs / npm package depenencies +yarn + +# Start the Vivify server in dev mode yarn dev ``` -to run the development server for Vivify on port 3000 that will (1) -automatically reload when you make changes to the code, and (2), unlike the -installed version, not shut down when there are no connected clients. -With the development server running, use +With the development server running, use:- ```sh +# Connect an instance to your Vivify dev server yarn viv ``` instead of your installed Vivify executable. This will (1) connect to the development server on port 3000 instead of running the installed server, and (2) use the `viv` executable in the repository. + +## Troubleshooting + +***TODO: Common errors and build problems here?*** diff --git a/README.md b/README.md index 52b718cc..64fbb6c3 100644 --- a/README.md +++ b/README.md @@ -117,14 +117,9 @@ directory as an argument! See below for installation options. - run `./configure ` - run `make install` -> [!NOTE] -> Some Linux distributions package a version of Node.js that will fail to build Vivify. In that case you'll need to download an official version from https://nodejs.org/. The recommended method is to use [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm/blob/master/README.md) -> -> ``` -> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash -> exec bash -> nvm install node -> ``` +> [!TIP] +> If you are having trouble building Vivify, or you'd like more detailed build +> instructions, see our [CONTRIBUTING](CONTRIBUTING.md) page ## Get help