Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweekism committed Jul 23, 2024
1 parent 1de9161 commit 5521d83
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ directory as an argument! See below for installation options.

> [!TIP]
> If you are having trouble building Vivify, or you'd like more detailed build
> instructions, see our [CONTRIBUTING](CONTRIBUTING.md) page
> instructions, see our [CONTRIBUTING](docs/CONTRIBUTING.md) page
## Get help

Expand Down
110 changes: 76 additions & 34 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / Lint Markdown

Heading levels should only increment by one level at a time

docs/CONTRIBUTING.md:16 MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md001.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

View workflow job for this annotation

GitHub Actions / Lint Markdown

Multiple consecutive blank lines

docs/CONTRIBUTING.md:57 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.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

Expand All @@ -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

View workflow job for this annotation

GitHub Actions / Lint Markdown

Spaces inside emphasis markers

docs/CONTRIBUTING.md:117:1 MD037/no-space-in-emphasis Spaces inside emphasis markers [Context: "** I"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md037.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
Expand Down

0 comments on commit 5521d83

Please sign in to comment.