diff options
author | 2021-08-26 12:08:52 -0700 | |
---|---|---|
committer | 2021-08-26 12:08:52 -0700 | |
commit | ff92be637ffd9a9841b771e94d8deef1c62422cb (patch) | |
tree | 56dab4a40c432e95914eaedbf3df7d3f8175b60d /docs | |
parent | 155676275b1c61fb37e22fb09c4967224b2c17af (diff) | |
download | astro-ff92be637ffd9a9841b771e94d8deef1c62422cb.tar.gz astro-ff92be637ffd9a9841b771e94d8deef1c62422cb.tar.zst astro-ff92be637ffd9a9841b771e94d8deef1c62422cb.zip |
add "astro preview" command (#1226)
* add "astro preview" command
* Update green-buttons-reflect.md
* Update cli-reference.md
Diffstat (limited to 'docs')
-rw-r--r-- | docs/package.json | 1 | ||||
-rw-r--r-- | docs/src/pages/fi/installation.md | 3 | ||||
-rw-r--r-- | docs/src/pages/fr/installation.md | 3 | ||||
-rw-r--r-- | docs/src/pages/guides/deploy.md | 3 | ||||
-rw-r--r-- | docs/src/pages/installation.md | 3 | ||||
-rw-r--r-- | docs/src/pages/reference/cli-reference.md | 6 | ||||
-rw-r--r-- | docs/src/pages/zh-CN/installation.md | 3 | ||||
-rw-r--r-- | docs/src/pages/zh-TW/installation.md | 3 |
8 files changed, 19 insertions, 6 deletions
diff --git a/docs/package.json b/docs/package.json index 74f312810..724adede2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,6 +6,7 @@ "dev": "astro dev", "start": "astro dev", "build": "astro build", + "preview": "astro preview", "lint": "run-p --aggregate-output lint:linkcheck", "lint:a11y": "start-test 'yarn dev --silent' 3000 'yarn lint:a11y:local'", "lint:a11y:local": "pa11y-ci --sitemap 'http://localhost:3000/sitemap.xml' --sitemap-find 'https://docs.astro.build' --sitemap-replace 'http://localhost:3000'", diff --git a/docs/src/pages/fi/installation.md b/docs/src/pages/fi/installation.md index f6e630daf..26f2e3884 100644 --- a/docs/src/pages/fi/installation.md +++ b/docs/src/pages/fi/installation.md @@ -61,7 +61,8 @@ Voit nyt vaihtaa oletuksena toimivan "scripts"-osion `npm init`in luomassa `pack "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "astro dev", -+ "build": "astro build" ++ "build": "astro build", ++ "preview": "astro preview" }, } ``` diff --git a/docs/src/pages/fr/installation.md b/docs/src/pages/fr/installation.md index 8fa439c96..96c7b8f39 100644 --- a/docs/src/pages/fr/installation.md +++ b/docs/src/pages/fr/installation.md @@ -86,7 +86,8 @@ Vous pouvez aussi remplacer la section "scripts" du fichier `package.json` avec "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "astro dev", -+ "build": "astro build" ++ "build": "astro build", ++ "preview": "astro preview" }, } ``` diff --git a/docs/src/pages/guides/deploy.md b/docs/src/pages/guides/deploy.md index de8aa69b6..ff0c30d95 100644 --- a/docs/src/pages/guides/deploy.md +++ b/docs/src/pages/guides/deploy.md @@ -13,7 +13,8 @@ The following guides are based on some shared assumptions: { "scripts": { "start": "astro dev", - "build": "astro build" + "build": "astro build", + "preview": "astro preview" } } ``` diff --git a/docs/src/pages/installation.md b/docs/src/pages/installation.md index ea6ff9d12..e5e0586e4 100644 --- a/docs/src/pages/installation.md +++ b/docs/src/pages/installation.md @@ -87,7 +87,8 @@ You can now replace the placeholder "scripts" section of your `package.json` fil "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "astro dev", -+ "build": "astro build" ++ "build": "astro build", ++ "preview": "astro preview" }, } ``` diff --git a/docs/src/pages/reference/cli-reference.md b/docs/src/pages/reference/cli-reference.md index 98957c328..06180d812 100644 --- a/docs/src/pages/reference/cli-reference.md +++ b/docs/src/pages/reference/cli-reference.md @@ -19,6 +19,12 @@ Specifies should port to run on. Defaults to `3000`. Builds your site for production. +### `astro preview` + +Start a local static file server to serve your built `dist/` directory. Useful for previewing your static build locally, before deploying it. + +This command is meant for local testing only, and is not designed to be run in production. For help with production hosting, check out our guide on [Deploying an Astro Website](/guides/deploy). + ## Global Flags ### `--config path` diff --git a/docs/src/pages/zh-CN/installation.md b/docs/src/pages/zh-CN/installation.md index b340edf8c..5512a6e18 100644 --- a/docs/src/pages/zh-CN/installation.md +++ b/docs/src/pages/zh-CN/installation.md @@ -92,7 +92,8 @@ npm install astro "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "astro dev", -+ "build": "astro build" ++ "build": "astro build", ++ "preview": "astro preview" }, } ``` diff --git a/docs/src/pages/zh-TW/installation.md b/docs/src/pages/zh-TW/installation.md index aa2270ea9..bf1ea4a1b 100644 --- a/docs/src/pages/zh-TW/installation.md +++ b/docs/src/pages/zh-TW/installation.md @@ -88,7 +88,8 @@ npm install astro "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "astro dev", -+ "build": "astro build" ++ "build": "astro build", ++ "preview": "astro preview" }, } ``` |