From 757cc6b9fd8d6315ff88e57d406c6abb0d43aa1b Mon Sep 17 00:00:00 2001 From: Jun Shindo <46585162+jay-es@users.noreply.github.com> Date: Sat, 17 Jul 2021 04:24:38 +0900 Subject: [PATCH] chore(docs): add colons to api pages (#4284) --- docs/guide/api-javascript.md | 10 +++++----- docs/guide/api-plugin.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index f67f0592255865..e93d5ca5bd8f97 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -4,13 +4,13 @@ Vite's JavaScript APIs are fully typed, and it's recommended to use TypeScript o ## `createServer` -**Type Signature** +**Type Signature:** ```ts async function createServer(inlineConfig?: InlineConfig): Promise ``` -**Example Usage** +**Example Usage:** ```js const { createServer } = require('vite') @@ -121,7 +121,7 @@ interface ViteDevServer { ## `build` -**Type Signature** +**Type Signature:** ```ts async function build( @@ -129,7 +129,7 @@ async function build( ): Promise ``` -**Example Usage** +**Example Usage:** ```js const path = require('path') @@ -150,7 +150,7 @@ const { build } = require('vite') ## `resolveConfig` -**Type Signature** +**Type Signature:** ```ts async function resolveConfig( diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index d918a19ac66f6b..d58b00b357fecd 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -154,7 +154,7 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo Modify Vite config before it's resolved. The hook receives the raw user config (CLI options merged with config file) and the current config env which exposes the `mode` and `command` being used. It can return a partial config object that will be deeply merged into existing config, or directly mutate the config (if the default merging cannot achieve the desired result). - **Example** + **Example:** ```js // return partial config (recommended) @@ -289,7 +289,7 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo - An array of tag descriptor objects (`{ tag, attrs, children }`) to inject to the existing HTML. Each tag can also specify where it should be injected to (default is prepending to ``) - An object containing both as `{ html, tags }` - **Basic Example** + **Basic Example:** ```js const htmlPlugin = () => {