From eb4effb6b77f940030110f73a4081b69909a8d5d Mon Sep 17 00:00:00 2001 From: Okiki Date: Thu, 11 Nov 2021 14:28:51 -0500 Subject: [PATCH] docs: seperate `npm run build` and `npm run dev` to avoid confusion (#1798) To avoid confusion I seperated the `npm run build` and the `npm run dev` commands, beginners might get confused by each command being listed in the same list, thinking they need to run `npm run build` before Astro works properly. Add `npm run preview` commands to all examples where they are missing --- docs/src/pages/de/quick-start.md | 3 +++ docs/src/pages/es/quick-start.md | 3 +++ docs/src/pages/fi/quick-start.md | 2 ++ docs/src/pages/fr/quick-start.md | 2 ++ docs/src/pages/ja/quick-start.md | 2 ++ docs/src/pages/nl/quick-start.md | 2 ++ docs/src/pages/quick-start.md | 3 +++ docs/src/pages/ru/quick-start.md | 2 ++ docs/src/pages/zh-CN/quick-start.md | 2 ++ docs/src/pages/zh-TW/quick-start.md | 2 ++ examples/blog-multiple-authors/README.md | 11 ++++++----- examples/blog/README.md | 11 ++++++----- examples/docs/README.md | 12 ++++++------ examples/minimal/README.md | 11 ++++++----- examples/portfolio-svelte/README.md | 11 ++++++----- examples/portfolio/README.md | 11 ++++++----- examples/starter/README.md | 11 ++++++----- 17 files changed, 65 insertions(+), 36 deletions(-) diff --git a/docs/src/pages/de/quick-start.md b/docs/src/pages/de/quick-start.md index f8545d3f4..b7b57879f 100644 --- a/docs/src/pages/de/quick-start.md +++ b/docs/src/pages/de/quick-start.md @@ -19,7 +19,10 @@ npm install # Fange an zu entwickeln! npm run dev +``` +Für Produktionsstandorte, +```shell # Wenn du bereit bist: Exportiere deine Seite nach `dist/` npm run build ``` diff --git a/docs/src/pages/es/quick-start.md b/docs/src/pages/es/quick-start.md index 2382c4bd7..baf8d3d76 100644 --- a/docs/src/pages/es/quick-start.md +++ b/docs/src/pages/es/quick-start.md @@ -19,7 +19,10 @@ npm install # comienza con el desarrollo npm run dev +``` +Para los sitios de producción, +```shell # cuando estés listo: crea tu sitio estático en la carpeta `dist/` npm run build ``` diff --git a/docs/src/pages/fi/quick-start.md b/docs/src/pages/fi/quick-start.md index 6bc0d92e0..a60b999d8 100644 --- a/docs/src/pages/fi/quick-start.md +++ b/docs/src/pages/fi/quick-start.md @@ -19,7 +19,9 @@ npm install # aloita kehittäminen! npm run dev +``` +```shell # kun olet valmis: luo oma staattinen sivustosi hakemistoon `dist/` npm run build ``` diff --git a/docs/src/pages/fr/quick-start.md b/docs/src/pages/fr/quick-start.md index 6cb5a2b3e..d24d3067e 100644 --- a/docs/src/pages/fr/quick-start.md +++ b/docs/src/pages/fr/quick-start.md @@ -19,7 +19,9 @@ npm install # Commencez à coder ! npm run dev +``` +```shell # Quand votre site est fin prêt, compilez-en une version statique dans le dossier `dist/` npm run build ``` diff --git a/docs/src/pages/ja/quick-start.md b/docs/src/pages/ja/quick-start.md index d79fb1a15..d7af5b05e 100644 --- a/docs/src/pages/ja/quick-start.md +++ b/docs/src/pages/ja/quick-start.md @@ -19,7 +19,9 @@ npm install # 開発を始めよう npm run dev +``` +```shell # 準備ができたら、`dist/`に静的サイトを構築します。 npm run build ``` diff --git a/docs/src/pages/nl/quick-start.md b/docs/src/pages/nl/quick-start.md index 359323ea6..19075291b 100644 --- a/docs/src/pages/nl/quick-start.md +++ b/docs/src/pages/nl/quick-start.md @@ -19,7 +19,9 @@ npm install # start de ontwikkeling! npm run dev +``` +```shell # zodra je klaar bent, bouw dan je website met het volgende commanda npm run build ``` diff --git a/docs/src/pages/quick-start.md b/docs/src/pages/quick-start.md index ac10b7e70..9d8126e3b 100644 --- a/docs/src/pages/quick-start.md +++ b/docs/src/pages/quick-start.md @@ -19,7 +19,10 @@ npm install # start developing! npm run dev +``` +For production sites, +```shell # when you're ready: build your static site to `dist/` npm run build ``` diff --git a/docs/src/pages/ru/quick-start.md b/docs/src/pages/ru/quick-start.md index 586a8da1d..859c3ebca 100644 --- a/docs/src/pages/ru/quick-start.md +++ b/docs/src/pages/ru/quick-start.md @@ -18,7 +18,9 @@ npm install # начинаем разработку! npm run dev +``` +```shell # когда все готово: запустите сборку вашего статического сайта в директорию `dist/` npm run build ``` diff --git a/docs/src/pages/zh-CN/quick-start.md b/docs/src/pages/zh-CN/quick-start.md index 2e760eb49..9b8e308bd 100644 --- a/docs/src/pages/zh-CN/quick-start.md +++ b/docs/src/pages/zh-CN/quick-start.md @@ -19,7 +19,9 @@ npm install # 启动项目 npm run dev +``` +```shell # 将项目打包到 dist 文件夹下 npm run build ``` diff --git a/docs/src/pages/zh-TW/quick-start.md b/docs/src/pages/zh-TW/quick-start.md index 3718e8957..67dd96b4b 100644 --- a/docs/src/pages/zh-TW/quick-start.md +++ b/docs/src/pages/zh-TW/quick-start.md @@ -19,7 +19,9 @@ npm install # 開始開發! npm run dev +``` +```shell # 做好之後:把靜態網站 build 進 `dist/` npm run build ``` diff --git a/examples/blog-multiple-authors/README.md b/examples/blog-multiple-authors/README.md index 53c9af60a..23aad66f2 100644 --- a/examples/blog-multiple-authors/README.md +++ b/examples/blog-multiple-authors/README.md @@ -42,11 +42,12 @@ Any static assets, like images, can be placed in the `public/` directory. All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more? diff --git a/examples/blog/README.md b/examples/blog/README.md index d01ff471a..15d7b3fae 100644 --- a/examples/blog/README.md +++ b/examples/blog/README.md @@ -42,11 +42,12 @@ Any static assets, like images, can be placed in the `public/` directory. All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more? diff --git a/examples/docs/README.md b/examples/docs/README.md index 83865d782..cd78f9495 100644 --- a/examples/docs/README.md +++ b/examples/docs/README.md @@ -21,12 +21,12 @@ npm init astro -- --template docs All commands are run from the root of the project, from a terminal: -| Command | Action | -|:-----------------|:---------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview`| Preview your build locally, before deploying | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | To deploy your site to production, check out our [Deploy an Astro Website](https://docs.astro.build/guides/deploy) guide. diff --git a/examples/minimal/README.md b/examples/minimal/README.md index b1284d33b..b078cf708 100644 --- a/examples/minimal/README.md +++ b/examples/minimal/README.md @@ -31,11 +31,12 @@ Any static assets, like images, can be placed in the `public/` directory. All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more? diff --git a/examples/portfolio-svelte/README.md b/examples/portfolio-svelte/README.md index d90b69d0f..b40609c3e 100644 --- a/examples/portfolio-svelte/README.md +++ b/examples/portfolio-svelte/README.md @@ -12,11 +12,12 @@ npm init astro -- --template portfolio All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more? diff --git a/examples/portfolio/README.md b/examples/portfolio/README.md index 6a32943e7..7d5a5a8e7 100644 --- a/examples/portfolio/README.md +++ b/examples/portfolio/README.md @@ -12,11 +12,12 @@ npm init astro -- --template portfolio All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more? diff --git a/examples/starter/README.md b/examples/starter/README.md index 1b16a8273..69a776bf5 100644 --- a/examples/starter/README.md +++ b/examples/starter/README.md @@ -31,11 +31,12 @@ Any static assets, like images, can be placed in the `public/` directory. All commands are run from the root of the project, from a terminal: -| Command | Action | -|:----------------|:--------------------------------------------| -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:3000` | -| `npm run build` | Build your production site to `./dist/` | +| Command | Action | +|:---------------- |:-------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | ## 👀 Want to learn more?