Skip to content

Commit

Permalink
Add types and doc for new-block (#406)
Browse files Browse the repository at this point in the history
* refactor api-extractor config

* fix docs home page

* fix

* test tsdoc for new-block

* use typedoc

* fix new-block comments

* test deploy

* remove pr deploy trigger
  • Loading branch information
qiweiii authored Sep 18, 2023
1 parent 3cd06ac commit ebea98b
Show file tree
Hide file tree
Showing 18 changed files with 232 additions and 1,104 deletions.
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

0 comments on commit ebea98b

Please sign in to comment.