Skip to content

Commit ef45335

Browse files
committed
docs: add the typedoc
1 parent 5945fa3 commit ef45335

18 files changed

Lines changed: 299 additions & 4 deletions

bun.lockb

6.07 KB
Binary file not shown.

docs/.vitepress/config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from "vitepress";
2+
import typedocSidebar from "../api/typedoc-sidebar.json";
23

34
// https://vitepress.dev/reference/site-config
45
export default defineConfig({
@@ -7,7 +8,16 @@ export default defineConfig({
78
description: "A NPM package to transpose and manage chord charts for music",
89
themeConfig: {
910
// https://vitepress.dev/reference/default-theme-config
10-
nav: [{ text: "Demo", link: "/" }],
11+
nav: [
12+
{ text: "Demo", link: "/" },
13+
{ text: "API", link: "/api/" },
14+
],
1115
socialLinks: [{ icon: "github", link: "https://github.com/hrgui/chord-charts" }],
16+
sidebar: [
17+
{
18+
text: "API",
19+
items: typedocSidebar,
20+
},
21+
],
1222
},
1323
});

docs/api/functions/allChords.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[@hrgui/chord-charts](../globals.md) / allChords
2+
3+
# Function: allChords()
4+
5+
> **allChords**(`input`, `opts`): `RegExpMatchArray`
6+
7+
Defined in: [index.ts:132](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L132)
8+
9+
Extras only the chords from the input string
10+
11+
## Parameters
12+
13+
### input
14+
15+
`string`
16+
17+
given a chord chart
18+
19+
### opts
20+
21+
[`InputOptions`](../type-aliases/InputOptions.md) & `object` = `{}`
22+
23+
Input Options, including sort
24+
25+
## Returns
26+
27+
`RegExpMatchArray`
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[@hrgui/chord-charts](../globals.md) / tranposeChord
2+
3+
# Function: tranposeChord()
4+
5+
> **tranposeChord**(`chord`, `originalKey`, `targetKey`): `string`
6+
7+
Defined in: [index.ts:171](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L171)
8+
9+
Transposes a single chord
10+
11+
## Parameters
12+
13+
### chord
14+
15+
`string`
16+
17+
chord to transpose, e.g. Dm7
18+
19+
### originalKey
20+
21+
`string`
22+
23+
the original key the chord was in
24+
25+
### targetKey
26+
27+
`string`
28+
29+
the target key to transpose the chord to
30+
31+
## Returns
32+
33+
`string`

docs/api/functions/transpose.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[@hrgui/chord-charts](../globals.md) / transpose
2+
3+
# Function: transpose()
4+
5+
> **transpose**(`input`, `originalKey`, `targetKey`): `string`
6+
7+
Defined in: [index.ts:160](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L160)
8+
9+
Transposes a chord chart to a new key
10+
11+
## Parameters
12+
13+
### input
14+
15+
`string`
16+
17+
chord chart
18+
19+
### originalKey
20+
21+
`string`
22+
23+
the original key the chord chart was in
24+
25+
### targetKey
26+
27+
`string`
28+
29+
the target key to transpose the chord chart to
30+
31+
## Returns
32+
33+
`string`

docs/api/functions/uniqueChords.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[@hrgui/chord-charts](../globals.md) / uniqueChords
2+
3+
# Function: uniqueChords()
4+
5+
> **uniqueChords**(`input`, `opts`): `string`[]
6+
7+
Defined in: [index.ts:149](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L149)
8+
9+
Shows the unique chords of a chord chart, used to establish a key
10+
11+
## Parameters
12+
13+
### input
14+
15+
`string`
16+
17+
### opts
18+
19+
[`InputOptions`](../type-aliases/InputOptions.md) = `{}`
20+
21+
## Returns
22+
23+
`string`[]

docs/api/functions/wrap.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[@hrgui/chord-charts](../globals.md) / wrap
2+
3+
# Function: wrap()
4+
5+
> **wrap**(`input`, `fn`, `opts`): `string`
6+
7+
Defined in: [index.ts:122](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L122)
8+
9+
## Parameters
10+
11+
### input
12+
13+
`string`
14+
15+
### fn
16+
17+
(`str`) => `any`
18+
19+
### opts
20+
21+
[`InputOptions`](../type-aliases/InputOptions.md) = `{}`
22+
23+
## Returns
24+
25+
`string`

docs/api/globals.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# @hrgui/chord-charts
2+
3+
## Type Aliases
4+
5+
- [InputOptions](type-aliases/InputOptions.md)
6+
- [Key](type-aliases/Key.md)
7+
8+
## Variables
9+
10+
- [keys](variables/keys.md)
11+
12+
## Functions
13+
14+
- [allChords](functions/allChords.md)
15+
- [tranposeChord](functions/tranposeChord.md)
16+
- [transpose](functions/transpose.md)
17+
- [uniqueChords](functions/uniqueChords.md)
18+
- [wrap](functions/wrap.md)

docs/api/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# @hrgui/chord-charts
2+
3+
A package that helps manage and transpose Guitar chord charts.
4+
5+
# Usage
6+
7+
```ts
8+
import { transpose } from "@hrgui/chord-charts";
9+
10+
console.log(
11+
transpose(
12+
`
13+
D G D
14+
Amazing Grace, how sweet the sound,
15+
A7
16+
That saved a wretch like me.
17+
D G D
18+
I once was lost, but now im found,
19+
A7 D
20+
Was blind, but now I see.
21+
`,
22+
"D",
23+
"C",
24+
),
25+
);
26+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[@hrgui/chord-charts](../globals.md) / InputOptions
2+
3+
# Type Alias: InputOptions
4+
5+
> **InputOptions**: `object`
6+
7+
Defined in: [index.ts:99](https://github.com/hrgui/chord-charts/blob/5945fa3cca5e7a9fbbe3cd4a4803e60977033ca0/src/index.ts#L99)
8+
9+
## Type declaration
10+
11+
### ignorecase?
12+
13+
> `optional` **ignorecase**: `boolean`
14+
15+
Ignores case

0 commit comments

Comments
 (0)