From 41e65b0e23b51b502f3cc10174a76f4e8415d0d9 Mon Sep 17 00:00:00 2001 From: Nayden Naydenov <31909318+nnaydenow@users.noreply.github.com> Date: Tue, 19 Dec 2023 17:18:27 +0200 Subject: [PATCH] docs: fix readme files (#7963) * docs: fix readme files * Update README.md * [build]: improve project build/start (#7624) * chore: add all files --------- Co-authored-by: Nayden Naydenov Co-authored-by: Peter Skelin --- README.md | 10 +++------- docs/6-contributing/03-playground-app.md | 24 ++++------------------- docs/6-contributing/04-writing-samples.md | 10 ++-------- docs/README.md | 2 +- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 4fb99a6f04e0..a65efb7ec7b3 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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) @@ -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. diff --git a/docs/6-contributing/03-playground-app.md b/docs/6-contributing/03-playground-app.md index 3cd6e1b50717..309e1e12efd6 100644 --- a/docs/6-contributing/03-playground-app.md +++ b/docs/6-contributing/03-playground-app.md @@ -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/ diff --git a/docs/6-contributing/04-writing-samples.md b/docs/6-contributing/04-writing-samples.md index 003d96d48c6c..b5db4e5ae4fd 100644 --- a/docs/6-contributing/04-writing-samples.md +++ b/docs/6-contributing/04-writing-samples.md @@ -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. +Note: 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. @@ -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. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 24744154fbbe..21d043575f4c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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)