Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types and doc for new-block #406

Merged
merged 8 commits into from
Sep 18, 2023
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ preview/
lib
.parcel-cache

# api-extractor output folder
# docs src output folder
docs-src

# vitepress cache
Expand Down
16 changes: 7 additions & 9 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@ import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Chopsticks (WIP)',
title: 'Chopsticks Docs (WIP)',
description: 'Chopsticks Types Documentation',
// Required for api-extractor markdown (/~https://github.com/vuejs/vitepress/pull/664)
markdown: { attrs: { disable: true } },
base: '/chopsticks/docs/',
srcDir: 'docs-src',
outDir: 'dist/docs',
rewrites: {
'chopsticks/:file': ':file',
'core/:file': ':file',
},
lastUpdated: true,
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [{ text: 'Home', link: '/' }],
sidebar: [
{
text: 'Packages',
items: [
{ text: 'Chopsticks', link: '/chopsticks.html' },
{ text: 'Core', link: '/chopsticks-core.html' },
{ text: 'Chopsticks', link: '/chopsticks/README.html' },
{ text: 'Core', link: '/core/README.html' },
],
},
],
search: {
provider: 'local',
},
socialLinks: [{ icon: 'github', link: '/~https://github.com/AcalaNetwork/chopsticks' }],
},
})
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Home page for chopstick docs site -->
[Home](./index.md)

## API Reference

## Packages

| Package | Description |
| --- | --- |
| [@acala-network/chopsticks](./chopsticks/README.md) | Chopsticks cli and rpc server |
| [@acala-network/chopsticks-core](./core/README.md) | Blockchain data structure |
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test:watch": "vitest",
"start": "yarn script:start",
"dev": "yarn script:run",
"docs:prep": "yarn workspaces foreach -pvit run docs:prep",
"docs:prep": "yarn workspaces foreach -pvit run docs:prep && cp docs/* docs-src",
"docs:dev": "yarn docs:prep && vitepress dev",
"docs:build": "yarn docs:prep && vitepress build",
"docs:preview": "yarn docs:build && vitepress preview"
Expand All @@ -38,8 +38,6 @@
"*.{js,ts,css,md}": "prettier --write"
},
"devDependencies": {
"@microsoft/api-documenter": "^7.22.33",
"@microsoft/api-extractor": "^7.36.4",
"@swc/core": "^1.3.78",
"@types/node": "^20.5.7",
"@types/prettier": "^3.0.0",
Expand All @@ -52,6 +50,8 @@
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"husky": "^8.0.3",
"prettier": "^3.0.2",
"typedoc": "^0.25.1",
"typedoc-plugin-markdown": "^3.16.0",
"typescript": "^5.1.6",
"unplugin-swc": "^1.4.2",
"vite-tsconfig-paths": "^4.2.0",
Expand Down
Loading