Skip to content

Commit

Permalink
Migrate docs for pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Jul 22, 2024
1 parent 018a272 commit 67b5271
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ of the repository to your local machine and change directories:

```bash
git clone https://github.com/your-username/vizarr.git
cd vizarr
cd vizarg
```

Set the `upstream` remote to the base `vizarr` repository:
Expand All @@ -19,33 +19,34 @@ Set the `upstream` remote to the base `vizarr` repository:
git remote add upstream https://github.com/hms-dbmi/vizarr.git
```

Install the dependencies to develop and build `vizarr` via `npm`.
Install the dependencies to develop and build `vizarr` via `pnpm`.

```bash
npm install
pnpm install
```

> Note: You need to have [Node.js](https://nodejs.org/en/) (v15.0 or later) to build
> and develop `vizarr`. I recommend using [`nvm`](https://github.com/nvm-sh/nvm) or
> Note: You need to have [Node.js](https://nodejs.org/en/) (v20.0 or later) to build
> and develop `vizarr`. I recommend using [`nvm`](https://github.com/nvm-sh/nvm) or
> [`fnm`](https://github.com/Schniz/fnm) to manage different version of Node.js
> on your machine.
### Running the development server

```bash
npm start
pnpm dev
```

The `start` command will start a development server on `http://localhost:8080` which you can navigate
to in your web browser. You can "live" edit the contents of any of the files within `src/` or `public/`
when running this server; changes are reflected instantly in the browser. Stop the development
server when you are done making changes.
The `dev` command will start a development server on `http://localhost:5173`
which you can navigate to in your web browser. You can "live" edit the contents
of any of the files within `src/` or `public/` when running this server;
changes are reflected instantly in the browser. Stop the development server
when you are done making changes.

- `src/` - contains all TypeScript source code
- `public/` - contains all static assets required for the site

Have a look at the other `script` commands in `package.json` for the project. These are standard to any JS
build and can be executed by running `npm run <command>`.
build and can be executed by running `pnpm <command>`.

### Making changes

Expand All @@ -65,17 +66,17 @@ Update your remote branch:
git push -u origin your-feature-branch-name
```

You can then make a pull-request to `vizarr`'s `main` branch. When making a pull-request,
your code will be checked for linting with `prettier`. Please run `npm run format`
to automatically format your code when making a pull-request.
You can then make a pull-request to `vizarr`'s `main` branch. When making a
pull-request, your code will be checked for linting with `biome`. Please run
`pnpm fix` to automatically format your code when making a pull-request.


### (Note to self) Building and publishing `vizarr`

Build a production version of the site:

```bash
npm version [<new version> | major | minor | patch]
npm publish
pnpm version [<new version> | major | minor | patch]
pnpm publish
```

0 comments on commit 67b5271

Please sign in to comment.