-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
77 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,32 +11,66 @@ sure you follow the steps below: | |
|
||
## Setting Up Your Build Environment | ||
|
||
### Build Requirements | ||
|
||
To build Vivify you need the following dependencies:- | ||
|
||
#### MacOS | ||
Check failure on line 16 in docs/CONTRIBUTING.md
|
||
|
||
TODO: Mac instructions | ||
|
||
#### Arch Linux/Manjaro | ||
|
||
```sh | ||
sudo pacman -S --needed jq yarn make zip | ||
``` | ||
sudo pacman -S --needed jq yarn make zip | ||
|
||
#### Fedora and derivatives | ||
|
||
```sh | ||
sudo dnf install jq yarn make zip | ||
``` | ||
sudo dnf install jq yarn make zip | ||
|
||
> [!TIP] | ||
> TODO: Mention linux nodejs issue and refer to following section on nodejs | ||
> [!NOTE] | ||
> The version of **Node.js** shipped with some Linux distributions will fail to | ||
> build **Vivify**, see the section below to install the latest node from **nvm** | ||
## Installing Node.js | ||
|
||
Node.js may be available with your OS or in your distros package manager. | ||
Alternatively you can install the latest version of Node.js using **[Node | ||
Version Manager](https://github.com/nvm-sh/nvm)** (**nvm**) | ||
|
||
To install **nvm** use:- | ||
|
||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
|
||
## Nodejs | ||
You will then need to reload your terminal by either closing it and opening a | ||
new one or by re-sourcing your run commands (bash eg: `source ~/.bashrc`) | ||
|
||
Now you can install the latest version of Node.js:- | ||
|
||
nvm install node | ||
|
||
> [!TIP] | ||
> You can return to the system version of node using `nvm use system` | ||
> | ||
> For more details on nvm usage or for troubleshooting installing nvm, visit the | ||
> nvm [Documentation][1] page | ||
> | ||
> [1]:<https://github.com/nvm-sh/nvm?tab=readme-ov-file#node-version-manager---> | ||
***TODO: Talk about nodejs linux broken etc.*** | ||
|
||
Check failure on line 57 in docs/CONTRIBUTING.md
|
||
## Building Vivify | ||
|
||
***TODO: Take build steps from readme.md*** | ||
First clone and open the **Vivify** repository | ||
|
||
git clone https://github.com/jannis-baum/Vivify.git | ||
cd Vivify | ||
|
||
Run `yarn` to download all node dependencies | ||
|
||
yarn | ||
|
||
Then build **Vivify** by running `make` | ||
|
||
make | ||
|
||
TODO: WIP | ||
|
||
## Running Vivify for Development | ||
|
||
|
@@ -46,40 +80,48 @@ 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; | ||
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. | ||
3. Unlike the installed version, not shut down when there are no connected | ||
clients. | ||
|
||
First, use `yarn` to make sure all node dependencies are up to date | ||
|
||
yarn | ||
|
||
Then start the **Vivify** server in dev mode | ||
|
||
yarn dev | ||
|
||
```sh | ||
# Run yarn to update any nodejs / npm package depenencies | ||
yarn | ||
Once the development server is running, you can connect as many instances as you | ||
like using:- | ||
|
||
# Start the Vivify server in dev mode | ||
yarn dev | ||
``` | ||
yarn viv . | ||
|
||
With the development server running, use:- | ||
> [!TIP] | ||
> Using `yarn viv` will connect to the development server on port 3000 instead | ||
> of running the installed server, and will use the viv executable in the | ||
> repository | ||
> | ||
> You can replace `.` with any path or filename | ||
## Troubleshooting | ||
|
||
### Build Error: Could not find the sentinel NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 | ||
|
||
```sh | ||
# Connect an instance to your Vivify dev server | ||
yarn viv | ||
``` | ||
Cause: This happens on some Linux distros when using the distro packaged | ||
versions of Node.js | ||
|
||
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. | ||
Resolution: Install the latest version of Node.js using nvm, See the | ||
** Installing Node.js** section above | ||
Check failure on line 117 in docs/CONTRIBUTING.md
|
||
|
||
## Testing rendering | ||
|
||
You can find files to test Vivify's rendering/parsing capabilities in the | ||
[`tests/`](tests/) directory. Please make sure to add to this in case you add | ||
anything new related to this. | ||
|
||
## Troubleshooting | ||
|
||
***TODO: Common errors and build problems here?*** | ||
|
||
## Writing Markdown | ||
|
||
We use | ||
|