Skip to content

Commit

Permalink
Merge pull request #677 from semaphore-protocol/docs/yarn-only
Browse files Browse the repository at this point in the history
Remove pnpm and npm from supported package managers
  • Loading branch information
cedoor authored Mar 4, 2024
2 parents dfb972d + e6198cf commit 6ad2a79
Showing 1 changed file with 0 additions and 194 deletions.
194 changes: 0 additions & 194 deletions apps/docs/versioned_docs/version-V4-beta/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
sidebar_position: 2
---

import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

# Getting started

Semaphore provides an official CLI to set up your project with Hardhat. If your NPM version is 5.2 or higher you can use NPX:
Expand All @@ -30,40 +27,11 @@ The [`semaphore CLI`](https://github.com/semaphore-protocol/semaphore/tree/main/

To start working on your project, install the dependencies:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
cd my-app
npm i
```

</TabItem>
<TabItem value="yarn">

```bash
cd my-app
yarn
```

</TabItem>
<TabItem value="pnpm">

```bash
cd my-app
pnpm install
```

</TabItem>
</Tabs>

## Output

The `create` command will create a directory called my-app (or whatever name you choose) inside the current folder. That directory will contain the initial project structure, which includes a simple contract, a task to deploy it, some tests and a Next.js application (the web-app folder) to interact with that contract.
Expand Down Expand Up @@ -111,138 +79,30 @@ cd apps/contracts

And compile your contracts:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm run compile
```

</TabItem>
<TabItem value="yarn">

```bash
yarn compile
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm compile
```

</TabItem>
</Tabs>

### Test contracts

Test your contracts:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm test
```

</TabItem>
<TabItem value="yarn">

```bash
yarn test
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm test
```

</TabItem>
</Tabs>

Generate a test coverage report:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm run test:coverage
```

</TabItem>
<TabItem value="yarn">

```bash
yarn test:coverage
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm test:coverage
```

</TabItem>
</Tabs>

Or a test gas report:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm run test:report-gas
```

</TabItem>
<TabItem value="yarn">

```bash
yarn test:report-gas
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm test:report-gas
```

</TabItem>
</Tabs>

### Deploy contracts

Follow the instructions below to deploy your contracts:
Expand All @@ -257,37 +117,10 @@ In the project root folder:

2. Go to the `apps/contracts` folder and deploy your contract.

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm run deploy -- --semaphore <semaphore-address> --group <group-id> --network sepolia
```

</TabItem>
<TabItem value="yarn">

```bash
yarn deploy --semaphore <semaphore-address> --group <group-id> --network sepolia
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm deploy --semaphore <semaphore-address> --group <group-id> --network sepolia
```

</TabItem>
</Tabs>

:::note
Check the Semaphore contract addresses [here](/deployed-contracts).
:::
Expand All @@ -300,37 +133,10 @@ In the project root folder:

Start the application:

<Tabs
defaultValue="npm"
groupId="package-managers"
values={[
{label: 'npm', value: 'npm'},
{label: 'Yarn', value: 'yarn'},
{label: 'pnpm', value: 'pnpm'}
]}>
<TabItem value="npm">

```bash
npm run dev
```

</TabItem>
<TabItem value="yarn">

```bash
yarn dev
```

</TabItem>
<TabItem value="pnpm">

```bash
pnpm dev
```

</TabItem>
</Tabs>

:::info
If you want to see the code of a comprehensive application built on top of Semaphore see the [boilerplate](https://github.com/semaphore-protocol/boilerplate/tree/main). For more info about the core libraries, keep reading the next guides.
:::

0 comments on commit 6ad2a79

Please sign in to comment.