Skip to content

Commit

Permalink
docs: fix readme files (#7963)
Browse files Browse the repository at this point in the history
* docs: fix readme files

* Update README.md

* [build]: improve project build/start (#7624)

* chore: add all files

---------

Co-authored-by: Nayden Naydenov <[email protected]>
Co-authored-by: Peter Skelin <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2023
1 parent 65a73d7 commit 41e65b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 36 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ The UI5 Web Components project contains several packages:

```sh
yarn # to install all dependencies
yarn build # to build the project initially (this step needs to be performed only the first time you run the project)
yarn start # to serve the project
```

Expand All @@ -149,15 +148,12 @@ A dev server will be started and the browser will open its index URL with a list
You can start the Playground app with the following commands:

```sh
# install playground specific dependencies (one time only)
cd packages/playground
yarn install:dependencies
yarn # to install all dependencies

# start the playground from the project root
cd ../..
yarn start:playground

# open http://localhost:4000/
# open http://localhost:6006/
```

**Note:** If you wish to manually install dependencies & run the Playground you can check out our [in depth tutorial](./docs/6-contributing/03-playground-app.md)
Expand All @@ -167,7 +163,7 @@ To build the UI5 Web Components project, run the following commands:

```sh
yarn # to install all dependencies
yarn build # to build the project
yarn ci:releasebuild # to build the project
```

Afterwards, you can find the build output in the `dist` folder of the corresponding package folder.
Expand Down
24 changes: 4 additions & 20 deletions docs/6-contributing/03-playground-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,16 @@ The [deployed](https://sap.github.io/ui5-webcomponents/) playground can be run l
In order to do so, you have to follow the steps below:

## 1. Install dependencies.
In the root directory run:
In the root directory run:
```bash
yarn install
yarn
```

## 2. Build the project Bundler.
```bash
yarn build #this is necessary only once.
```

Or if you want to test your changes live in storybook, run:

```bash
yarn start
```

## 3. Go to the playground package.
```bash
cd packages/playground
```

## 4. Start the playground locally
## 2. Start the playground locally
In your terminal, run the following command:

```bash
yarn storybook
yarn start:playground
```

This will build all the necessary assets and will start local server on your machine. To access the playground, visit: http://localhost:6006/
10 changes: 2 additions & 8 deletions docs/6-contributing/04-writing-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ To run the [UI5 Web Components Storybook app](https://sap.github.io/ui5-webcompo
### 1. In the root folder of the project, run the following command:

```bash
yarn build # this step needs to be performed only the first time you run the project, to build the project initially
yarn start:playground
```

### 2. Go to the playground package.
```bash
cd packages/playground
yarn storybook # to run the storybook app
```
Note that these steps are required only for running the Storybook app locally and not for general development.
<b>Note:</b> This are required only for running the Storybook app locally and not for general development.

## What's a Story
A story is a documentation of a UI component that captures its rendered state in various scenarios. Stories are useful for documenting all the potential states that a component can display, and they allow developers to test UI components in isolation.
Expand Down Expand Up @@ -148,5 +143,4 @@ Several build scripts are used to generate the stories documentation. They are l
## Troubleshooting
If you encounter an error when running yarn storybook, try the following:

- Make sure you have built the sources by running `yarn build`.
- Storybook parses the documentation from the `docs` folder. Files are transformed from `.md` to `.mdx` format. If you encounter an error, check if it is mdx related, locate the errored file and use the [MDX Playground](https://mdxjs.com/playground/) to fix it.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Welcome to the UI5 Web Components documentation!

Browse the directories to find the needed content, or read the same docs on the [official site](https://sap.github.io/ui5-webcomponents/main/playground)
Browse the directories to find the needed content, or read the same docs on the [official site](https://sap.github.io/ui5-webcomponents/playground)

0 comments on commit 41e65b0

Please sign in to comment.