Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/appkit-react/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit-react/README.md
-->

# @ton/appkit-react

React components and hooks for AppKit.
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit-react/docs/components.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit-react/docs/components.md
-->

# Components

`@ton/appkit-react` provides a set of themed, ready-to-use UI components for building TON dApps.
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit-react/docs/hooks.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit-react/docs/hooks.md
-->

# Hooks

AppKit React provides a set of hooks to interact with the blockchain and wallets.
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit/README.md
-->

# TonAppKit

A dApp-side integration layer for TON Connect with a unified asset API for TON, Jettons, and NFTs
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit/docs/actions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit/docs/actions.md
-->

# Actions

AppKit provides a set of actions to interact with the blockchain and wallets.
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit/docs/connectors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit/docs/connectors.md
-->

# Connectors

AppKit supports wallet connections through connectors. The primary connector is `TonConnect`.
Expand Down
6 changes: 6 additions & 0 deletions packages/appkit/docs/swap.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/appkit/docs/swap.md
-->

# Swap

AppKit supports swapping assets through the `SwapProvider` interface. The primary provider is `OmnistonSwapProvider`, which integrates with the [STON.fi](https://ston.fi) DEX aggregator via the [Omniston SDK](https://docs.ston.org/docs/developer-section/sdk/omniston-sdk).
Expand Down
6 changes: 6 additions & 0 deletions packages/walletkit/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: template/packages/walletkit/README.md
-->

# TonWalletKit

A production-ready wallet-side integration layer for TON Connect, designed for building TON wallets at scale
Expand Down
26 changes: 23 additions & 3 deletions scripts/update-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,20 @@ async function findTemplateFiles(): Promise<string[]> {
return [];
}

const entries = await fs.readdir(templateDir);
return entries.filter((name) => name.endsWith('.md')).map((name) => path.join(templateDir, name));
const files: string[] = [];
async function walk(dir: string): Promise<void> {
const entries = await fs.readdir(dir, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
await walk(fullPath);
} else if (entry.isFile() && entry.name.endsWith('.md')) {
files.push(fullPath);
}
}
}
await walk(templateDir);
return files.sort();
}

function parseTemplateParams(content: string): { params: TemplateParams; body: string } {
Expand Down Expand Up @@ -287,8 +299,16 @@ async function processTemplateFile(templatePath: string): Promise<void> {

// Use target from template parameters
const outPath = path.resolve(cwd, params.target);
const sourceRelative = path.relative(cwd, templatePath);
const generatedHeader = `<!--
This file is auto-generated. Do not edit manually.
Changes will be overwritten when running the docs update script.
Source template: ${sourceRelative}
-->

`;
await fs.mkdir(path.dirname(outPath), { recursive: true });
await fs.writeFile(outPath, result, 'utf8');
await fs.writeFile(outPath, generatedHeader + result, 'utf8');
console.log(`Updated markdown: ${path.relative(cwd, outPath)} from ${path.relative(cwd, templatePath)}`);
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading