Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,64 @@ promote a positive and inclusive environment.
First fork and clone the repository. If you're not sure how to do this, please watch
[these videos](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).

See the README for more detailed development instructions.
### Installation

```bash
corepack enable
pnpm install
```

This installs all the dependencies for all the packages and builds the `@netlify/remix-runtime`,
`@netlify/remix-adapter`, `@netlify/remix-edge-adapter`, and `@netlify/vite-plugin-react-router` packages.

### Testing

To build the packages, run the build command.

```bash
pnpm run build:packages
```

Run the build watch command to have packages built when they are changed.

```bash
pnpm run build:packages:watch
```

To run unit tests:

```bash
pnpm run test:unit
```

To run all tests (including linting and typechecking):

```bash
pnpm run test
```

#### End-to-end integration tests

These tests are meant to be very terse, basic, happy-path "user journey" system tests. These should generally map to
user-facing features and should rarely be added to.

Prerequisites:

- [Netlify CLI](https://docs.netlify.com/cli/get-started/) installed globally
- Install Playwright browsers (it should prompt you automatically the first time):
- `pnpm exec playwright install --with-deps`

To run end-to-end integration tests:

```bash
pnpm run test:e2e
```

To add a new fixture site called `my-fixture`:

1. create a new directory `tests/e2e/fixtures/my-fixture`
2. register it in `tests/e2e/support/fixtures` as `myFixture`
3. [inject `myFixture` directly into any test](https://playwright.dev/docs/test-fixtures#using-a-fixture)

## How to write commit messages

Expand Down
62 changes: 3 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ This project is not a template for Remix apps. It is a set of packages used by
[the Netlify Remix template](https://github.com/netlify/remix-template).

The project is a pnpm monorepo. Packages are located in the `packages` directory, and demo sites are in `demos`. There
are three packages:
are four packages:

- `@netlify/remix-adapter` - The Remix adapter for Netlify Functions
- `@netlify/remix-edge-adapter` - The Remix adapter for Netlify Edge Functions
- `@netlify/remix-runtime` - The Remix runtime for Netlify Edge Functions
- `@netlify/vite-plugin-react-router` - The React Router 7+ Vite plugin for Netlify

## Hydrogen

Expand All @@ -21,61 +22,4 @@ Shopify Hydrogen sites are supported and automatically detected. However, only

## Development

### Installation

```bash
corepack enable
pnpm install
```

This installs all the dependencies for all the packages and builds the `@netlify/remix-runtime`,
`@netlify/remix-adapter`, and `@netlify/remix-edge-adapter` packages.

### Testing

To build the packages, run the build command.

```bash
pnpm run build:packages
```

Run the build watch command to have packages built when they are changed.

```bash
pnpm run build:packages:watch
```

To run unit tests:

```bash
pnpm run test:unit
```

To run all tests (including linting and typechecking):

```bash
pnpm run test
```

#### End-to-end integration tests

These tests are meant to be very terse, basic, happy-path "user journey" system tests. These should generally map to
user-facing features and should rarely be added to.

Prerequisites:

- [Netlify CLI](https://docs.netlify.com/cli/get-started/) installed globally
- Install Playwright browsers (it should prompt you automatically the first time):
- `pnpm exec playwright install --with-deps`

To run end-to-end integration tests:

```bash
pnpm run test:e2e
```

To add a new fixture site called `my-fixture`:

1. create a new directory `tests/e2e/fixtures/my-fixture`
2. register it in `tests/e2e/support/fixtures` as `myFixture`
3. [inject `myFixture` directly into any test](https://playwright.dev/docs/test-fixtures#using-a-fixture)
See the [CONTRIBUTING.md](./CONTRIBUTING.md) file for development setup, testing, and contribution guidelines.