Skip to content

Commit

Permalink
Merge pull request #228 from matiasbenary/main
Browse files Browse the repository at this point in the history
feat: added near-workspace-js typedoc
  • Loading branch information
ailisp authored Dec 1, 2023
2 parents 13d7615 + 5dbc715 commit 9f44ac3
Show file tree
Hide file tree
Showing 6 changed files with 3,168 additions and 2,671 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/typedoc-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy TypeDoc on GitHub pages

on:
push:
branches:
main

env:
NODE_VERSION: 18.x.x
ENTRY_FILE: 'packages'
CONFIG_PATH: 'tsconfig.base.json'
USES_PNPM: 'true'

jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Build documentation
run: yarn docs:generate

- name: Deploy to GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs
clean: true
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"test": "yarn test:sandbox && yarn test:testnet",
"prepare": "husky install",
"release": "yarn lerna publish",
"release:prerelease": "yarn release --dist-tag next"
"release:prerelease": "yarn release --dist-tag next",
"docs:generate": "typedoc"
},
"devDependencies": {
"@ava/typescript": "^2.0.0",
Expand All @@ -29,7 +30,8 @@
"husky": "^7.0.1",
"lerna": "^5.2.0",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
"typedoc": "^0.24",
"typescript": "^4.6",
"xo": "^0.44.0"
},
"engines": {
Expand Down Expand Up @@ -70,4 +72,4 @@
"workspaces": [
"packages/js"
]
}
}
2 changes: 1 addition & 1 deletion packages/js/__tests__/jsonrpc.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import process from 'process';

import test from 'ava';

import {JsonRpcProvider} from '..';
import {JsonRpcProvider} from '../dist/index.js';

test('check url', t => {
const provider = JsonRpcProvider.fromNetwork('mainnet');
Expand Down
9 changes: 9 additions & 0 deletions packages/js/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": [
"../../typedoc.json"
],
"entryPoints": [
"src"
],
"entryPointStrategy": "expand",
}
13 changes: 13 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"includeVersion": true,
"entryPoints": [
"packages/js",
],
"entryPointStrategy": "packages",
"githubPages": true,
"validation": {
"notExported": false
},
"out": "docs",
"readme": "./README.md"
}
Loading

0 comments on commit 9f44ac3

Please sign in to comment.