Skip to content

Commit 2537b92

Browse files
Merge pull request #40 from strapi/chore/demo-readme-update
chore: update readme for demo
2 parents 2e0a806 + 0e643c5 commit 2537b92

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

README.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,24 +264,52 @@ This repository includes demo projects located in the `/demo` directory to help
264264

265265
### Using Demo Scripts
266266

267-
The `package.json` includes several scripts to help you manage and run the demo projects:
267+
The `package.json` includes several scripts to help you manage and run the demo projects. These scripts are designed to streamline the process of setting up and running the demo projects, making it easier for developers to test and interact with the SDK.
268268

269-
- **`demo:seed`**: Seeds the Strapi application with example data. This script also generates `.env` files with API tokens for the `demo-node-typescript` and `demo-node-javascript` projects.
269+
The most important basic commands to get started are:
270+
271+
- **`demo:setup`**: A comprehensive setup command that installs dependencies, sets up the environment, builds the projects, and seeds the demo application. This is a one-stop command to prepare everything needed to run the demos.
270272

271273
```bash
272-
pnpm run demo:seed
274+
pnpm run demo:setup
275+
```
276+
277+
- **`demo:run`**: Runs the Strapi application server in development mode. This command is useful for testing and developing.
278+
279+
```bash
280+
pnpm run demo:run
273281
```
274282

275-
- **`demo:seed:clean`**: Cleans the existing data and re-seeds the Strapi application.
283+
- **`demo:seed:clean`**: Cleans the existing data and re-seeds the Strapi demo application. This command is helpful for resetting the demo data to its initial state.
276284

277285
```bash
278286
pnpm run demo:seed:clean
279287
```
280288

281-
- **`demo:run`**: Starts the Strapi application in development mode.
289+
The following scripts shouldn't need to be used generally, but are also available to run individual parts of the setup or reset process:
290+
291+
- **`demo:build`**: Builds the main project and the TypeScript and JavaScript demo projects. This command ensures that all necessary build steps are completed for the demo projects to run.
282292

283293
```bash
284-
pnpm run demo:run
294+
pnpm run demo:build
295+
```
296+
297+
- **`demo:install`**: Installs all dependencies for the main project and all demo projects, including TypeScript, JavaScript, HTML, and Next.js demos. This command is essential to prepare the environment for running the demos.
298+
299+
```bash
300+
pnpm run demo:install
301+
```
302+
303+
- **`demo:env`**: Sets up the environment for the Strapi demo application by copying the example environment file if it doesn't already exist.
304+
305+
```bash
306+
pnpm run demo:env
307+
```
308+
309+
- **`demo:seed`**: Seeds the Strapi application with example data. This script also generates `.env` files with API tokens for the `demo-node-typescript` and `demo-node-javascript` projects.
310+
311+
```bash
312+
pnpm run demo:seed
285313
```
286314

287315
### Adding New Projects

0 commit comments

Comments
 (0)