Skip to content

Commit

Permalink
Merge install instruction blocks, fixes #60
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Dec 17, 2022
1 parent 41096d5 commit 9852427
Show file tree
Hide file tree
Showing 10 changed files with 350 additions and 87 deletions.
1 change: 1 addition & 0 deletions apps/website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/.vitepress/cache
14 changes: 6 additions & 8 deletions apps/website/docs/api/contracts/runtypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@

Integration is distributed as a separate package, you have to install it and its peer dependencies before usage

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install runtypes @farfetched/runtypes
```

with `yarn`

```sh
```sh [yarn]
yarn add runtypes @farfetched/runtypes
```

with `npm`

```sh
```sh [npm]
npm install runtypes @farfetched/runtypes
```

:::

## Showcases

- [Real-world showcase with SolidJS around JSON API](https://github.com/igorkamyshev/farfetched/tree/master/apps/showcase/solid-real-world-rick-morty/)
Expand Down
13 changes: 5 additions & 8 deletions apps/website/docs/api/contracts/zod.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

Integration is distributed as a separate package, you have to install it and its peer dependencies before usage

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install zod @farfetched/zod
```

with `yarn`

```sh
```sh [yarn]
yarn add zod @farfetched/zod
```

with `npm`

```sh
```sh [npm]
npm install zod @farfetched/zod
```
:::

## `zodContract`

Expand Down
14 changes: 6 additions & 8 deletions apps/website/docs/api/ui/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@

Integration is distributed as a separate package, you have to install it and its peer dependency before usage:

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install @farfetched/react effector-react
```

with `yarn`

```sh
```sh [yarn]
yarn add @farfetched/react effector-react
```

with `npm`

```sh
```sh [npm]
npm install @farfetched/react effector-react
```

:::

## Showcases

- [Real-world showcase with React around JSON API](https://github.com/igorkamyshev/farfetched/tree/master/apps/showcase/react-real-world-pokemons/)
Expand Down
14 changes: 6 additions & 8 deletions apps/website/docs/api/ui/solid.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@

Integration is distributed as a separate package, you have to install it and its peer dependency before usage:

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install @farfetched/solid effector-solid
```

with `yarn`

```sh
```sh [yarn]
yarn add @farfetched/solid effector-solid
```

with `npm`

```sh
```sh [npm]
npm install @farfetched/solid effector-solid
```

:::

## Showcases

- [Real-world showcase with SolidJS around JSON API](https://github.com/igorkamyshev/farfetched/tree/master/apps/showcase/solid-real-world-rick-morty/)
Expand Down
28 changes: 12 additions & 16 deletions apps/website/docs/recipes/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,22 @@ Farfetched does not require any special configuration for Vite for basic usage.

1. Install required dependencies:

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install --dev vite-plugin-babel
```

with `yarn`

```sh
```sh [yarn]
yarn add --dev vite-plugin-babel
```

with `npm`

```sh
```sh [npm]
npm install --dev vite-plugin-babel
```

:::

2. Add [`vite-plugin-babel`](https://github.com/owlsdepartment/vite-plugin-babel) to your project:

```ts
Expand Down Expand Up @@ -80,24 +78,22 @@ export default defineConfig({
1. Install required dependencies:

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install --dev unplugin-swc @effector/swc-plugin @swc/core
```

with `yarn`

```sh
```sh [yarn]
yarn add --dev unplugin-swc @effector/swc-plugin @swc/core
```

with `npm`

```sh
```sh [npm]
npm install --dev unplugin-swc @effector/swc-plugin @swc/core
```

:::

2. Add [`unplugin-swc`](https://github.com/egoist/unplugin-swc) and [`@effector/swc-plugin`](https://github.com/effector/swc-plugin) to your config:

```ts
Expand Down
14 changes: 6 additions & 8 deletions apps/website/docs/shared/sids_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ Read more about `effector/babel-plugin` configuration in the [Effector's documen

[SWC](https://swc.rs) is a blazing fast alternative to Babel. If you are using it, you can install `@effector/swc-plugin` to get the same DX as with Babel.

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install --dev @effector/swc-plugin @swc/core
```

with `yarn`

```sh
```sh [yarn]
yarn add --dev @effector/swc-plugin @swc/core
```

with `npm`

```sh
```sh [npm]
npm install --dev @effector/swc-plugin @swc/core
```

:::

Now just modify your `.swcrc` config to enable installed plugin:

```json
Expand Down
14 changes: 6 additions & 8 deletions apps/website/docs/tutorial/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,22 @@

First, you need to install Farfetched and its peer dependency:

with `pnpm`
::: code-group

```sh
```sh [pnpm]
pnpm install @farfetched/core effector
```

with `yarn`

```sh
```sh [yarn]
yarn add @farfetched/core effector
```

with `npm`

```sh
```sh [npm]
npm install @farfetched/core effector
```

:::

:::info
Farfetched declares Effector as a peer dependency to prevent two instances of Effector in the same application. Read more about relation between Farfetched and Effector in [the statement](/statements/effector).
:::
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"vite": "^3.1.4",
"vite-plugin-solid": "^2.3.9",
"vite-tsconfig-paths": "^3.5.1",
"vitepress": "1.0.0-alpha.28",
"vitepress": "1.0.0-alpha.32",
"vitepress-plugin-mermaid": "^2.0.8",
"vitest": "^0.25.4",
"vue": "^3.2.37"
Expand Down
Loading

0 comments on commit 9852427

Please sign in to comment.