Skip to content

Commit

Permalink
docs: normalize Array format in READMEs (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotWoods authored and shellscape committed Dec 26, 2019
1 parent 1789ae0 commit 16f8ba5
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions packages/alias/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Instructs the plugin to use an alternative resolving algorithm, rather than the

### `entries`

Type: `Object | Array[Object]`<br>
Type: `Object | Array[...Object]`<br>
Default: `null`

Specifies an `Object`, or an `Array` of `Object`, which defines aliases used to replace values in `import` or `require` statements. With either format, the order of the entries is important, in that the first defined rules are applied first. This option also supports [Regular Expression Alias](#regular-expression-aliases) matching.
Expand All @@ -96,9 +96,9 @@ alias({
});
```

#### `Array[Object]` Format
#### `Array[...Object]` Format

The `Array[Object]` format allows specifying aliases as objects, which can be useful for complex key/value pairs.
The `Array[...Object]` format allows specifying aliases as objects, which can be useful for complex key/value pairs.

```js
entries: [
Expand Down
2 changes: 1 addition & 1 deletion packages/buble/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
6 changes: 3 additions & 3 deletions packages/commonjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default CommonJS modules are targeted.

### `extensions`

Type: `Array(String)`<br>
Type: `Array[...String]`<br>
Default: `['.js']`

Search for extensions other than .js in the order specified.
Expand Down Expand Up @@ -122,7 +122,7 @@ commonjs({

### `ignore`

Type: `Array(String | (String) => Boolean)`<br>
Type: `Array[...String | (String) => Boolean]`<br>
Default: `[]`

Sometimes you have to leave require statements unconverted. Pass an array containing the IDs or an `id => boolean` function. Only use this option if you know what you're doing!
Expand Down
2 changes: 1 addition & 1 deletion packages/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
2 changes: 1 addition & 1 deletion packages/inject/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
2 changes: 1 addition & 1 deletion packages/json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
8 changes: 4 additions & 4 deletions packages/node-resolve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma

### `mainFields`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `['module', 'main']`

The fields to scan in a package.json to determine the entry point if this list contains "browser", overrides specified in "pkg.browser" will be used
Expand Down Expand Up @@ -84,7 +84,7 @@ Some package.json files have a "browser" field which specifies alternative files

### `extensions`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `['.mjs', '.js', '.json', '.node']`

Resolve extensions other than .js in the order specified.
Expand All @@ -105,7 +105,7 @@ Lock the module search in this path (like a chroot). Modules defined outside thi

### `only`

Type: `Array[String|RegExp]`<br>
Type: `Array[...String|RegExp]`<br>
Default: `null`

Example: `only: ['some_module', /^@some_scope\/.*$/]`
Expand All @@ -119,7 +119,7 @@ If true, inspect resolved files to check that they are ES2015 modules.

### `dedupe`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `[]`

Force resolving for these modules to root's node_modules that helps to prevent bundling the same package multiple times if package is imported from dependencies.
Expand Down
4 changes: 2 additions & 2 deletions packages/pluginutils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Returns: `String`

#### `include` and `exclude`

Type: `String | Array[String|RegExp]`<br>
Type: `String | Array[...String|RegExp]`<br>

A valid [`minimatch`](https://www.npmjs.com/package/minimatch) pattern, or array of patterns. If `options.include` is omitted or has zero length, filter will return `true` by default. Otherwise, an ID must match one or more of the `minimatch` patterns, and must not match any of the `options.exclude` patterns.

Expand Down Expand Up @@ -181,7 +181,7 @@ Outputs the string ES module source:
Extracts the names of all assignment targets based upon specified patterns.

Parameters: `(param: Node)`<br>
Returns: `Array[String]`
Returns: `Array[...String]`

#### `param`

Expand Down
4 changes: 2 additions & 2 deletions packages/replace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In addition to the properties and values specified for replacement, users may al

### `delimiters`

Type: `Array[String, String]`<br>
Type: `Array[...String, String]`<br>
Default: `['\b', '\b']`

Specifies the boundaries around which strings will be replaced. By default, delimiters are [word boundaries](https://www.regular-expressions.info/wordboundaries.html). See [Word Boundaries](#word-boundaries) below for more information.
Expand All @@ -66,7 +66,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
4 changes: 2 additions & 2 deletions packages/strip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ If `true`, instructs the plugin to remove debugger statements.

### `functions`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `[ 'console.*', 'assert.*' ]`

Specifies the functions that the plugin will target and remove.

### `labels`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `[]`

Specifies the [labeled blocks](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label) that the plugin will target and remove.
Expand Down
2 changes: 1 addition & 1 deletion packages/sucrase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`
Type: `String` | `Array[...String]`
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all `.ts` and `.tsx` files are targeted.
Expand Down
2 changes: 1 addition & 1 deletion packages/url/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `['**/*.svg', '**/*.png', '**/*.jpg', '**/*.gif']`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default .svg, .png, .jpg, and .gif files are targeted.
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma

### `sync`

Type: `Array[String]`<br>
Type: `Array[...String]`<br>
Default: `null`

Specifies an array of strings that each represent a WebAssembly file to load synchronously. See [Synchronous Modules](#synchronous-modules) for a functional example.
Expand Down
2 changes: 1 addition & 1 deletion packages/yaml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns

### `include`

Type: `String` | `Array(String)`<br>
Type: `String` | `Array[...String]`<br>
Default: `null`

A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.
Expand Down

0 comments on commit 16f8ba5

Please sign in to comment.