Skip to content

Commit b6a89e0

Browse files
committed
docs: move intro to guide and set up llmstxt
1 parent 7e9e488 commit b6a89e0

10 files changed

Lines changed: 92 additions & 31 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Using [TypeBox](https://github.com/sinclairzx81/typebox), [d3-dsv](https://d3js.
99
[![NPM Version](https://img.shields.io/npm/v/sheethuahua)](https://www.npmjs.com/package/sheethuahua)
1010

1111
[📖 View full documentation](https://punchupworld.github.io/sheethuahua/)
12+
[🤖 Use llms.txt](https://punchupworld.github.io/sheethuahua/llms.txt)
1213

1314
<!-- #region doc-index -->
1415

bun.lock

Lines changed: 52 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/.vitepress/config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { defineConfig } from 'vitepress';
2+
import llmstxt from 'vitepress-plugin-llms';
23
import { generateSidebar } from 'vitepress-sidebar';
34
import typedocSidebar from '../references/typedoc-sidebar.json';
45

@@ -39,7 +40,7 @@ export default defineConfig({
3940
{ text: 'References', link: '/references.html' },
4041
],
4142
sidebar: [
42-
// @ts-ignore
43+
// @ts-expect-error incompatible type
4344
...(generateSidebar({
4445
excludePattern: ['references'],
4546
documentRootPath: 'docs',
@@ -73,4 +74,11 @@ export default defineConfig({
7374
level: [2, 3],
7475
},
7576
},
77+
vite: {
78+
plugins: [
79+
llmstxt({
80+
domain: 'https://punchupworld.github.io',
81+
}),
82+
],
83+
},
7684
});
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Overview of Sheethuahua — a set of schemas, transformers, type-safe parsers and formatters for CSV and Google Sheets data, with notes on Google Sheets rate limits.
3+
---
4+
15
# Introduction
26

37
CSV (or Google Sheets) is an easy to used data format. But it is quite unpredictable, and not that flexible. We aim to help you with **"Sheethuahua"**, a set of schemas, transformers, type-safe parsers and formatters. What you need to do is:

docs/guide/1-getting-started.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Installation instructions for the sheethuahua npm package (npm, yarn, pnpm, bun) and example imports of core functions.
3+
---
4+
15
# Getting Started
26

37
Sheethuahua is available on [NPM](https://www.npmjs.com/package/sheethuahua) package repository.
@@ -41,3 +45,8 @@ import {
4145
// ...
4246
} from 'sheethuahua';
4347
```
48+
49+
::: tip
50+
51+
🤖 LLM texts are available in [standard](/llms.txt) and [full](/llms-full.txt) version
52+
:::

docs/guide/2-schema.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Schema definition using Column, Object, and Tuple — including nested schemas and type inference with StaticDecode.
3+
---
4+
15
# Schema
26

37
Schemas define how each row from CSV/Sheet will be transformed into.

docs/guide/3-transformer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Transformers that decode/encode CSV string cells into typed values — built-in transformers (asString, asNumber, asBoolean, asDate, asOneOf, asArray), custom transformers via createTransformer, and optional/fallback variants.
3+
---
4+
15
# Transformer
26

37
Every cell in CSV/Sheets is a `string`. Transformers contain instructions about how to convert a string of each cell to be the data you want (decode) and convert it back (encode). `Column()` requires a transformer in the 2nd argument.

docs/guide/4-parser.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Parsing CSV data from different sources — parseCsv for strings, fetchCsv for URLs, and Spreadsheet for Google Sheets, with debugging options.
3+
---
4+
15
# Parser
26

37
Parser validate and decode the input CSV from the given _data source_ and the _schema_. If validation has failed, the error will be thrown.

docs/guide/5-formatter.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
description: Formatting JavaScript data back to CSV string using formatToCsv and schema-defined encoders — the inverse of parsing.
3+
---
4+
15
# Formatter
26

37
Formatter is the opposite of parser: it validates and encodes JavaScript data back to the CSV string with the given _schema_. If validation has failed, the error will be thrown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"typescript": "^5.6.2",
6868
"typescript-eslint": "^8.33.1",
6969
"vitepress": "^1.4.2",
70+
"vitepress-plugin-llms": "^1.12.2",
7071
"vitepress-sidebar": "^1.28.0"
7172
}
7273
}

0 commit comments

Comments
 (0)