Skip to content
Closed
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
88 changes: 29 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,56 +92,45 @@ Please change the directory after cloning the repository using the `cd <folder-n

### ⬇️ Install Dependencies

Next, install the dependencies by running the following command in the `react-play` repo. we recommend using `yarn` but you can install using `npm` too
Next, install all dependencies using **pnpm**.
Make sure you have `pnpm` installed globally before proceeding.

```bash
yarn install
pnpm install
```

Or
```
npm install
```
If you don't have `pnpm` installed on your PC, follow the steps below to install it:

if you don't have `yarn` installed on your PC, follow the steps below to install it..
**Windows / Linux / macOS**

**Windows**
1. open your command prompt as administrator.
2. write `corepack enable` and hit enter.
3. then `npm install --global yarn`
1. Open your terminal or command prompt.
2. Run the following command to install `pnpm` globally:

**Linux**
1. open terminal and hit `npm install --global yarn`
```bash
npm install -g pnpm
```

**MacOS**
1. open terminal and hit `npm install --global yarn`
or
`brew install yarn`

**Or Download Package**
If you are unable to install yarn following the above-mentioned process, then you can simply download the package and install it. Visit the official website of Yarn; there you can just expand the "Alternative" section and it will ask for the version to download for Windows, Linux, or Mac.
`https://classic.yarnpkg.com/en/docs/install#windows-stable`
**Or Download Package**
If you are unable to install `pnpm` following the above-mentioned process, you can simply download the package and install it. Visit the official website of `pnpm`; there you can find instructions for Windows, Linux, or macOS.
[https://pnpm.io/installation](https://pnpm.io/installation)

> **Note**: `ReactPlay` runs on React 18. However, some of our dependencies are yet to upgrade to version 18. So please use the following command if you face difficulties installing the dependencies. Also, ensure you are using Node.js version >= 16.x.

> **Note**: `ReactPlay` runs on React 18. However, some of our dependencies are yet to upgrade to version 18. So please use the following command when you face difficulties installing the dependencies. Also, ensure to use Node.js version >= 16.x
```bash
pnpm install --legacy-peer-deps
```

```
npm install --legacy-peer-deps
```


### 🦄 Start the Development Mode

Use the following command to start the app in the development mode:

```bash
yarn start
pnpm start
```
or if you installed dependencies using ``npm`` use below command

```
npm start
```

**Note**: The `start` script automatically invokes "linters" process. Should you need to run the app without `lint` the use `start:nolint` instead.
However make sure that you run `start` script at least once before committing your code. Code with linter error may not be reviewed.
Expand All @@ -157,43 +146,31 @@ Use the following command to format and lint the code:
#### Format the code

```bash
yarn run format
```
OR
```
npm run format
pnpm run format
```


#### Lint the code
*to check the linting issue*
```bash
yarn run lint
```
OR
```
npm run lint
pnpm run lint
```

*to fix the linting issue*
```bash
yarn run lint:fix
```
OR
```
npm run lint:fix
pnpm run lint:fix
```


### 🧱 Build the App for Production

Use the following command to build the app for production:

```bash
yarn build
```
OR
```
npm build
pnpm build
```


It builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.

--------------------------------------------------------------
Expand All @@ -202,22 +179,15 @@ It builds the app for production to the `build` folder. It correctly bundles Rea

Use the following command to install browser(s) binaries to test locally:
```bash
yarn install playwright
```
OR
```
npm install playwright
pnpm install playwright
```

Use the following command to run Playwright tests:

```bash
yarn e2e
```
OR
```
npm run e2e
pnpm run e2e
```

👀 Read more about testing in [react-play](../react-play/e2e/README.md)

👀 Read more about playwright: https://playwright.dev/
Expand Down