-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a28cf5
commit 443f100
Showing
28 changed files
with
2,328 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,260 @@ | ||
## JavaScript API | ||
# JavaScript API | ||
|
||
TODO | ||
<!-- START JavaScript API --> | ||
## Exported members | ||
|
||
### Functions | ||
|
||
- [`build`](#build) | ||
- [`init`](#init) | ||
- [`preview`](#preview) | ||
|
||
### Interfaces | ||
|
||
- [`BuildCliFlags`](#buildcliflags) | ||
- [`InitCliFlags`](#initcliflags) | ||
- [`PreviewCliFlags`](#previewcliflags) | ||
|
||
### Type Aliases | ||
|
||
- [`StructuredDocument`](#structureddocument) | ||
- [`StructuredDocumentSection`](#structureddocumentsection) | ||
- [`VivliostyleConfigSchema`](#vivliostyleconfigschema) | ||
|
||
## Functions | ||
|
||
### build() | ||
|
||
> **build**(`cliFlags`): `Promise`\<`void`\> | ||
Build publication file(s) from the given configuration. | ||
|
||
```ts | ||
import { build } from '@vivliostyle/cli'; | ||
build({ | ||
configPath: './vivliostyle.config.js', | ||
logLevel: 'silent', | ||
}); | ||
``` | ||
|
||
#### Parameters | ||
|
||
• **cliFlags**: [`BuildCliFlags`](README.md#buildcliflags) | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[src/build.ts:74](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/build.ts#L74) | ||
|
||
*** | ||
|
||
### init() | ||
|
||
> **init**(`cliFlags`): `Promise`\<`void`\> | ||
Initialize a new vivliostyle.config.js file. | ||
|
||
#### Parameters | ||
|
||
• **cliFlags**: [`InitCliFlags`](README.md#initcliflags) | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[src/init.ts:21](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/init.ts#L21) | ||
|
||
*** | ||
|
||
### preview() | ||
|
||
> **preview**(`cliFlags`): `Promise`\<`void`\> | ||
Open a preview of the publication. | ||
|
||
#### Parameters | ||
|
||
• **cliFlags**: [`PreviewCliFlags`](README.md#previewcliflags) | ||
|
||
#### Returns | ||
|
||
`Promise`\<`void`\> | ||
|
||
#### Defined in | ||
|
||
[src/preview.ts:45](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/preview.ts#L45) | ||
|
||
## Interfaces | ||
|
||
### BuildCliFlags | ||
|
||
#### Extends | ||
|
||
- `CliFlags` | ||
|
||
#### Properties | ||
|
||
| Property | Type | Description | | ||
| ------ | ------ | ------ | | ||
| `author?` | `string` | - | | ||
| `bleed?` | `string` | - | | ||
| `browser?` | `"chromium"` \| `"firefox"` \| `"webkit"` | - | | ||
| `bypassedPdfBuilderOption?` | `string` | - | | ||
| `configPath?` | `string` | - | | ||
| `cropMarks?` | `boolean` | - | | ||
| `cropOffset?` | `string` | - | | ||
| `css?` | `string` | - | | ||
| `executableBrowser?` | `string` | - | | ||
| ~~`executableChromium?`~~ | `string` | **Deprecated** | | ||
| `http?` | `boolean` | - | | ||
| `image?` | `string` | - | | ||
| `input?` | `string` | - | | ||
| `language?` | `string` | - | | ||
| `logLevel?` | `"silent"` \| `"info"` \| `"verbose"` \| `"debug"` | - | | ||
| `preflight?` | `"press-ready"` \| `"press-ready-local"` | - | | ||
| `preflightOption?` | `string`[] | - | | ||
| `pressReady?` | `boolean` | - | | ||
| `quick?` | `boolean` | - | | ||
| `readingProgression?` | `"ltr"` \| `"rtl"` | - | | ||
| `renderMode?` | `"local"` \| `"docker"` | - | | ||
| `sandbox?` | `boolean` | - | | ||
| `singleDoc?` | `boolean` | - | | ||
| `size?` | `string` | - | | ||
| `style?` | `string` | - | | ||
| `targets?` | `Pick`\<`OutputFormat`, `"path"` \| `"format"`\>[] | - | | ||
| `theme?` | `string` | - | | ||
| `timeout?` | `number` | - | | ||
| `title?` | `string` | - | | ||
| `userStyle?` | `string` | - | | ||
| ~~`verbose?`~~ | `boolean` | **Deprecated** | | ||
| `viewer?` | `string` | - | | ||
| `viewerParam?` | `string` | - | | ||
|
||
*** | ||
|
||
### InitCliFlags | ||
|
||
#### Properties | ||
|
||
| Property | Type | | ||
| ------ | ------ | | ||
| `author?` | `string` | | ||
| `language?` | `string` | | ||
| `logLevel?` | `"silent"` \| `"info"` \| `"debug"` | | ||
| `size?` | `string` | | ||
| `theme?` | `string` | | ||
| `title?` | `string` | | ||
|
||
*** | ||
|
||
### PreviewCliFlags | ||
|
||
#### Extends | ||
|
||
- `CliFlags` | ||
|
||
#### Properties | ||
|
||
| Property | Type | Description | | ||
| ------ | ------ | ------ | | ||
| `author?` | `string` | - | | ||
| `bleed?` | `string` | - | | ||
| `browser?` | `"chromium"` \| `"firefox"` \| `"webkit"` | - | | ||
| `configPath?` | `string` | - | | ||
| `cropMarks?` | `boolean` | - | | ||
| `cropOffset?` | `string` | - | | ||
| `css?` | `string` | - | | ||
| `executableBrowser?` | `string` | - | | ||
| ~~`executableChromium?`~~ | `string` | **Deprecated** | | ||
| `http?` | `boolean` | - | | ||
| `image?` | `string` | - | | ||
| `input?` | `string` | - | | ||
| `language?` | `string` | - | | ||
| `logLevel?` | `"silent"` \| `"info"` \| `"verbose"` \| `"debug"` | - | | ||
| `preflight?` | `"press-ready"` \| `"press-ready-local"` | - | | ||
| `preflightOption?` | `string`[] | - | | ||
| `pressReady?` | `boolean` | - | | ||
| `quick?` | `boolean` | - | | ||
| `readingProgression?` | `"ltr"` \| `"rtl"` | - | | ||
| `renderMode?` | `"local"` \| `"docker"` | - | | ||
| `sandbox?` | `boolean` | - | | ||
| `singleDoc?` | `boolean` | - | | ||
| `size?` | `string` | - | | ||
| `style?` | `string` | - | | ||
| `targets?` | `Pick`\<`OutputFormat`, `"path"` \| `"format"`\>[] | - | | ||
| `theme?` | `string` | - | | ||
| `timeout?` | `number` | - | | ||
| `title?` | `string` | - | | ||
| `userStyle?` | `string` | - | | ||
| ~~`verbose?`~~ | `boolean` | **Deprecated** | | ||
| `viewer?` | `string` | - | | ||
| `viewerParam?` | `string` | - | | ||
|
||
## Type Aliases | ||
|
||
### StructuredDocument | ||
|
||
> **StructuredDocument**: `object` | ||
#### Type declaration | ||
|
||
| Name | Type | | ||
| ------ | ------ | | ||
| `children` | [`StructuredDocument`](README.md#structureddocument)[] | | ||
| `href` | `string` | | ||
| `sections`? | [`StructuredDocumentSection`](README.md#structureddocumentsection)[] | | ||
| `title` | `string` | | ||
|
||
#### See | ||
|
||
https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md | ||
|
||
#### Defined in | ||
|
||
[src/input/schema.ts:6](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/input/schema.ts#L6) | ||
|
||
*** | ||
|
||
### StructuredDocumentSection | ||
|
||
> **StructuredDocumentSection**: `object` | ||
#### Type declaration | ||
|
||
| Name | Type | | ||
| ------ | ------ | | ||
| `children` | [`StructuredDocumentSection`](README.md#structureddocumentsection)[] | | ||
| `headingHtml` | `string` | | ||
| `headingText` | `string` | | ||
| `href`? | `string` | | ||
| `id`? | `string` | | ||
| `level` | `number` | | ||
|
||
#### See | ||
|
||
https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md | ||
|
||
#### Defined in | ||
|
||
[src/input/schema.ts:26](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/input/schema.ts#L26) | ||
|
||
*** | ||
|
||
### VivliostyleConfigSchema | ||
|
||
> **VivliostyleConfigSchema**: `v.InferInput`\<*typeof* [`VivliostyleConfigSchema`](README.md#vivliostyleconfigschema)\> | ||
#### See | ||
|
||
https://github.com/vivliostyle/vivliostyle-cli/blob/main/docs/config.md | ||
|
||
#### Defined in | ||
|
||
[src/input/schema.ts:530](https://github.com/vivliostyle/vivliostyle-savepdf/blob/9cc5dc33679356b8489ef5d413afb669ea106d94/src/input/schema.ts#L530) | ||
|
||
<!-- END JavaScript API --> |
Oops, something went wrong.