Skip to content

Commit 5b8f4fc

Browse files
committed
✨feature: add doc
1 parent b65513a commit 5b8f4fc

File tree

4 files changed

+210
-8
lines changed

4 files changed

+210
-8
lines changed

.github/workflows/main_ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88

99
permissions:
1010
contents: read
11+
pages: write
12+
id-token: write
13+
1114

1215
jobs:
1316
##################
@@ -124,3 +127,30 @@ jobs:
124127
cache: 'npm'
125128
- run: npm ci
126129
- run: npm run lint:tests
130+
131+
build-doc:
132+
runs-on: ubuntu-latest
133+
steps:
134+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
135+
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
136+
with:
137+
node-version: 'lts/*'
138+
registry-url: https://registry.npmjs.org/
139+
cache: 'npm'
140+
- run: npm ci
141+
- run: npm run doc
142+
- name: Upload artifact
143+
uses: actions/upload-pages-artifact@v2
144+
with:
145+
path: ./docs
146+
147+
deploy-doc:
148+
environment:
149+
name: github-pages
150+
url: ${{ steps.deployment.outputs.page_url }}
151+
runs-on: ubuntu-latest
152+
needs: build-doc
153+
steps:
154+
- name: Deploy to GitHub Pages
155+
id: deployment
156+
uses: actions/deploy-pages@v2

package-lock.json

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

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"prettier": "prettier \"ts_src/**/*.ts\" \"test/**/*.ts\" --ignore-path ./.prettierignore",
4040
"prettierjs": "prettier \"src/**/*.js\" --ignore-path ./.prettierignore",
4141
"test": "npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage",
42-
"unit": "npm run build && npm run nobuild:unit"
42+
"unit": "npm run build && npm run nobuild:unit",
43+
"doc": "npx typedoc"
4344
},
4445
"repository": {
4546
"type": "git",
@@ -53,6 +54,7 @@
5354
"bech32": "^2.0.0",
5455
"bip174": "^2.1.1",
5556
"bs58check": "^3.0.1",
57+
"typedoc": "^0.25.1",
5658
"typeforce": "^1.11.3",
5759
"varuint-bitcoin": "^1.1.2"
5860
},

typedoc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://typedoc.org/schema.json",
3+
"name": "bitcoinjs-lib",
4+
"entryPoints": ["./ts_src"],
5+
"out": "docs",
6+
"searchCategoryBoosts": {
7+
"Component": 2,
8+
"Model": 1.2
9+
},
10+
"searchGroupBoosts": {
11+
"Classes": 1.5
12+
},
13+
"visibilityFilters": {},
14+
"hideGenerator": true,
15+
"excludePrivate": true,
16+
"includeVersion": true
17+
}

0 commit comments

Comments
 (0)