Skip to content

Commit

Permalink
Restructure documentation, add Guides, embed videos (#90)
Browse files Browse the repository at this point in the history
* Restructure documentation, add Guides, embed videos
* Change code block to snippet, incorporate feedback
* Add info about the languages that Bluehawk supports
  • Loading branch information
dacharyc authored May 11, 2022
1 parent 8bb5766 commit 5a52a1b
Show file tree
Hide file tree
Showing 49 changed files with 5,575 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/docs/develop/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
position: 6
label: "Develop"
1 change: 1 addition & 0 deletions docs/docs/develop/api/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: "API"
214 changes: 214 additions & 0 deletions docs/docs/develop/api/classes/Bluehawk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
---
id: "Bluehawk"
title: "Class: Bluehawk"
sidebar_label: "Bluehawk"
sidebar_position: 0
custom_edit_url: null
---

The frontend of Bluehawk.

## Constructors

### constructor

**new Bluehawk**(`configuration?`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `configuration?` | `BluehawkConfiguration` |

#### Defined in

[src/bluehawk/bluehawk.ts:44](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L44)

## Properties

### \_parserStore

`Private` **\_parserStore**: `ParserStore`

#### Defined in

[src/bluehawk/bluehawk.ts:227](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L227)

___

### \_processor

`Private` **\_processor**: `Processor`

#### Defined in

[src/bluehawk/bluehawk.ts:226](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L226)

## Accessors

### processor

`get` **processor**(): `Processor`

#### Returns

`Processor`

#### Defined in

[src/bluehawk/bluehawk.ts:222](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L222)

## Methods

### addLanguage

**addLanguage**(`forFileExtension`, `languageSpecification`): `void`

Specify the special patterns for a given language.

#### Parameters

| Name | Type |
| :------ | :------ |
| `forFileExtension` | `string` \| `string`[] |
| `languageSpecification` | [`LanguageSpecification`](../interfaces/LanguageSpecification) |

#### Returns

`void`

#### Defined in

[src/bluehawk/bluehawk.ts:79](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L79)

___

### parse

**parse**(`source`, `options?`): [`ParseResult`](../interfaces/ParseResult)

Parses the given source file into tags.

#### Parameters

| Name | Type |
| :------ | :------ |
| `source` | [`Document`](Document) |
| `options?` | `Object` |
| `options.languageSpecification?` | [`LanguageSpecification`](../interfaces/LanguageSpecification) |
| `options.reporter?` | `ActionReporter` |

#### Returns

[`ParseResult`](../interfaces/ParseResult)

#### Defined in

[src/bluehawk/bluehawk.ts:162](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L162)

___

### parseAndProcess

**parseAndProcess**(`path`, `optionsIn?`): `Promise`<`void`\>

Runs through all given source paths to parse and process them.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` \| `string`[] | The path or paths to the directory or files to parse and process. |
| `optionsIn?` | `ParseAndProcessOptions` | - |

#### Returns

`Promise`<`void`\>

#### Defined in

[src/bluehawk/bluehawk.ts:92](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L92)

___

### process

**process**(`parseResult`, `processOptions?`): `Promise`<`BluehawkFiles`\>

Executes the tags on the given source. Use [Bluehawk.subscribe](Bluehawk#subscribe) to get
results.

#### Parameters

| Name | Type |
| :------ | :------ |
| `parseResult` | [`ParseResult`](../interfaces/ParseResult) |
| `processOptions?` | [`ProcessOptions`](../interfaces/ProcessOptions) |

#### Returns

`Promise`<`BluehawkFiles`\>

#### Defined in

[src/bluehawk/bluehawk.ts:215](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L215)

___

### registerTag

**registerTag**(`tag`, `alternateName?`): `void`

Register the given tag on the processor and validator. This enables
support for the tag under the given name.

#### Parameters

| Name | Type |
| :------ | :------ |
| `tag` | [`AnyTag`](../interfaces/AnyTag) |
| `alternateName?` | `string` |

#### Returns

`void`

#### Defined in

[src/bluehawk/bluehawk.ts:72](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L72)

___

### subscribe

**subscribe**(`listener`): `void`

Subscribe to processed documents as they are processed by Bluehawk.

#### Parameters

| Name | Type |
| :------ | :------ |
| `listener` | [`Listener`](../modules#listener) \| [`Listener`](../modules#listener)[] |

#### Returns

`void`

#### Defined in

[src/bluehawk/bluehawk.ts:203](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L203)

___

### waitForListeners

**waitForListeners**(): `Promise`<`void`\>

#### Returns

`Promise`<`void`\>

#### Defined in

[src/bluehawk/bluehawk.ts:155](https://github.com/dacharyc/Bluehawk/blob/2b37a07/src/bluehawk/bluehawk.ts#L155)
Loading

0 comments on commit 5a52a1b

Please sign in to comment.