Skip to content

Commit

Permalink
✨feature: add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonandjay committed Sep 29, 2023
1 parent b65513a commit 5b8f4fc
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 8 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

permissions:
contents: read
pages: write
id-token: write


jobs:
##################
Expand Down Expand Up @@ -124,3 +127,30 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run lint:tests

build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run doc
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs

deploy-doc:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-doc
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
167 changes: 160 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"prettier": "prettier \"ts_src/**/*.ts\" \"test/**/*.ts\" --ignore-path ./.prettierignore",
"prettierjs": "prettier \"src/**/*.js\" --ignore-path ./.prettierignore",
"test": "npm run build && npm run format:ci && npm run lint && npm run nobuild:coverage",
"unit": "npm run build && npm run nobuild:unit"
"unit": "npm run build && npm run nobuild:unit",
"doc": "npx typedoc"
},
"repository": {
"type": "git",
Expand All @@ -53,6 +54,7 @@
"bech32": "^2.0.0",
"bip174": "^2.1.1",
"bs58check": "^3.0.1",
"typedoc": "^0.25.1",
"typeforce": "^1.11.3",
"varuint-bitcoin": "^1.1.2"
},
Expand Down
17 changes: 17 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "bitcoinjs-lib",
"entryPoints": ["./ts_src"],
"out": "docs",
"searchCategoryBoosts": {
"Component": 2,
"Model": 1.2
},
"searchGroupBoosts": {
"Classes": 1.5
},
"visibilityFilters": {},
"hideGenerator": true,
"excludePrivate": true,
"includeVersion": true
}

0 comments on commit 5b8f4fc

Please sign in to comment.