Skip to content

Commit

Permalink
chore(docs): add colons to api pages (#4284)
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed Jul 16, 2021
1 parent 5935055 commit 757cc6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/guide/api-javascript.md
Expand Up @@ -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<ViteDevServer>
```

**Example Usage**
**Example Usage:**

```js
const { createServer } = require('vite')
Expand Down Expand Up @@ -121,15 +121,15 @@ interface ViteDevServer {

## `build`

**Type Signature**
**Type Signature:**

```ts
async function build(
inlineConfig?: InlineConfig
): Promise<RollupOutput | RollupOutput[]>
```

**Example Usage**
**Example Usage:**

```js
const path = require('path')
Expand All @@ -150,7 +150,7 @@ const { build } = require('vite')

## `resolveConfig`

**Type Signature**
**Type Signature:**

```ts
async function resolveConfig(
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/api-plugin.md
Expand Up @@ -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)
Expand Down Expand Up @@ -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 `<head>`)
- An object containing both as `{ html, tags }`

**Basic Example**
**Basic Example:**

```js
const htmlPlugin = () => {
Expand Down

0 comments on commit 757cc6b

Please sign in to comment.