Skip to content

Commit

Permalink
Auto generate docs (#139)
Browse files Browse the repository at this point in the history
* chore: add autogeneration of docs

* chore: generate docs and private hidden things

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
crutchcorn and autofix-ci[bot] authored Nov 25, 2024
1 parent 9a9c585 commit ce04036
Show file tree
Hide file tree
Showing 39 changed files with 756 additions and 139 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm prettier:write
- name: Generate Docs
run: pnpm docs:generate
- name: Apply fixes
uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
with:
commit-message: 'ci: apply automated fixes'
commit-message: 'ci: apply automated fixes and generate docs'
64 changes: 52 additions & 12 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,53 +70,93 @@
"label": "API Reference",
"children": [
{
"label": "Store",
"to": "reference/Store"
"label": "JavaScript Reference",
"to": "reference/index"
},
{
"label": "Classes / Store",
"to": "reference/classes/store"
},
{
"label": "Interfaces / StoreOptions",
"to": "reference/interfaces/storeoptions"
}
],
"frameworks": [
{
"label": "react",
"children": [
{
"label": "useStore",
"to": "framework/react/reference/useStore"
"label": "React Reference",
"to": "framework/react/reference/index"
},
{
"label": "Functions / useStore",
"to": "framework/react/reference/functions/usestore"
},
{
"label": "Functions / shallow",
"to": "framework/react/reference/functions/shallow"
}
]
},
{
"label": "vue",
"children": [
{
"label": "useStore",
"to": "framework/vue/reference/useStore"
"label": "Vue Reference",
"to": "framework/vue/reference/index"
},
{
"label": "Functions / useStore",
"to": "framework/vue/reference/functions/usestore"
},
{
"label": "Functions / shallow",
"to": "framework/vue/reference/functions/shallow"
}
]
},
{
"label": "solid",
"children": [
{
"label": "useStore",
"to": "framework/solid/reference/useStore"
"label": "Solid Reference",
"to": "framework/solid/reference/index"
},
{
"label": "Functions / useStore",
"to": "framework/solid/reference/functions/usestore"
}
]
},
{
"label": "angular",
"children": [
{
"label": "injectStore",
"to": "framework/angular/reference/injectStore"
"label": "Angular Reference",
"to": "framework/angular/reference/index"
},
{
"label": "Functions / injectStore",
"to": "framework/angular/reference/functions/functionsinjectStore"
}
]
},
{
"label": "svelte",
"children": [
{
"label": "useStore",
"to": "framework/svelte/reference/useStore"
"label": "Svelte Reference",
"to": "framework/svelte/reference/index"
},
{
"label": "Functions / useStore",
"to": "framework/svelte/reference/functions/usestore"
},
{
"label": "Functions / shallow",
"to": "framework/svelte/reference/functions/shallow"
}
]
}
Expand Down
37 changes: 37 additions & 0 deletions docs/framework/angular/reference/functions/injectstore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
id: injectStore
title: injectStore
---

# Function: injectStore()

```ts
function injectStore<TState, TSelected, TUpdater>(
store,
selector,
options): Signal<TSelected>
```

## Type Parameters

**TState**

**TSelected** = `NoInfer`\<`TState`\>

**TUpdater** *extends* `AnyUpdater` = `AnyUpdater`

## Parameters

**store**: `Store`\<`TState`, `TUpdater`\>

**selector** = `...`

**options**: `CreateSignalOptions`\<`TSelected`\> & `object` = `...`

## Returns

`Signal`\<`TSelected`\>

## Defined in

[index.ts:17](https://github.com/TanStack/store/blob/main/packages/angular-store/src/index.ts#L17)
10 changes: 10 additions & 0 deletions docs/framework/angular/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: "@tanstack/angular-store"
title: "@tanstack/angular-store"
---

# @tanstack/angular-store

## Functions

- [injectStore](functions/injectstore.md)
6 changes: 0 additions & 6 deletions docs/framework/angular/reference/injectStore.md

This file was deleted.

28 changes: 28 additions & 0 deletions docs/framework/react/reference/functions/shallow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: shallow
title: shallow
---

# Function: shallow()

```ts
function shallow<T>(objA, objB): boolean
```

## Type Parameters

**T**

## Parameters

**objA**: `T`

**objB**: `T`

## Returns

`boolean`

## Defined in

[index.ts:30](https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L30)
32 changes: 32 additions & 0 deletions docs/framework/react/reference/functions/usestore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: useStore
title: useStore
---

# Function: useStore()

```ts
function useStore<TState, TSelected, TUpdater>(store, selector): TSelected
```

## Type Parameters

**TState**

**TSelected** = `NoInfer`\<`TState`\>

**TUpdater** *extends* `AnyUpdater` = `AnyUpdater`

## Parameters

**store**: `Store`\<`TState`, `TUpdater`\>

**selector** = `...`

## Returns

`TSelected`

## Defined in

[index.ts:11](https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L11)
11 changes: 11 additions & 0 deletions docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: "@tanstack/react-store"
title: "@tanstack/react-store"
---

# @tanstack/react-store

## Functions

- [shallow](functions/shallow.md)
- [useStore](functions/usestore.md)
28 changes: 0 additions & 28 deletions docs/framework/react/reference/useStore.md

This file was deleted.

32 changes: 32 additions & 0 deletions docs/framework/solid/reference/functions/usestore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: useStore
title: useStore
---

# Function: useStore()

```ts
function useStore<TState, TSelected, TUpdater>(store, selector): Accessor<TSelected>
```

## Type Parameters

**TState**

**TSelected** = `NoInfer`\<`TState`\>

**TUpdater** *extends* `AnyUpdater` = `AnyUpdater`

## Parameters

**store**: `Store`\<`TState`, `TUpdater`\>

**selector** = `...`

## Returns

`Accessor`\<`TSelected`\>

## Defined in

[index.tsx:13](https://github.com/TanStack/store/blob/main/packages/solid-store/src/index.tsx#L13)
10 changes: 10 additions & 0 deletions docs/framework/solid/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: "@tanstack/solid-store"
title: "@tanstack/solid-store"
---

# @tanstack/solid-store

## Functions

- [useStore](functions/usestore.md)
6 changes: 0 additions & 6 deletions docs/framework/solid/reference/useStore.md

This file was deleted.

28 changes: 28 additions & 0 deletions docs/framework/svelte/reference/functions/shallow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: shallow
title: shallow
---

# Function: shallow()

```ts
function shallow<T>(objA, objB): boolean
```

## Type Parameters

**T**

## Parameters

**objA**: `T`

**objB**: `T`

## Returns

`boolean`

## Defined in

[index.svelte.ts:39](https://github.com/TanStack/store/blob/main/packages/svelte-store/src/index.svelte.ts#L39)
Loading

0 comments on commit ce04036

Please sign in to comment.