Skip to content

Commit

Permalink
ci(docs): 👷 auto generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
4very committed Jun 10, 2024
1 parent 621fd98 commit 4639a4e
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ jobs:

- name: Run tests
run: pnpm run test

- name: Build
run: pnpm run build

- name: Generate Docs
run: pnpm run docs

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
temp
coverage
coverage
docs
8 changes: 7 additions & 1 deletion .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ const npm = {
const git = {
message:
"release: :bookmark: ${nextRelease.version} <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> [skip ci]\n\n${nextRelease.notes}",
assets: ['dist/**', 'package.json', 'pnpm-lock.yaml', 'CHANGELOG.md'],
assets: [
'dist/**',
'package.json',
'pnpm-lock.yaml',
'CHANGELOG.md',
'docs/**',
],
}

/**
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"test:coverage": "vitest run --coverage",
"lint": "echo \"Lint\"",
"commit": "cz",
"release": "semantic-release"
"release": "semantic-release",
"docs": "pnpm docs:html && pnpm docs:md",
"docs:html": "typedoc --out docs/html",
"docs:md": "typedoc --out docs/md --plugin typedoc-plugin-markdown"
},
"keywords": [],
"author": "",
Expand All @@ -37,6 +40,8 @@
"rollup-plugin-typescript-paths": "^1.5.0",
"semantic-release": "^23.1.1",
"semantic-release-pnpm": "^1.0.2",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^4.0.3",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1",
Expand Down
72 changes: 72 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ export {
downloadFile,
generatePDF,
}

export type * from './types'
9 changes: 8 additions & 1 deletion src/types/GeneralSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ export type DateSearch = {
endDate: string
}

// TODO document all types
/**
* Search params for an eLibrary General Search
* https://elibrary.ferc.gov/eLibrary/search
*
*
*
*
*/
export type GeneralSearchParams = {
// ways to search
docketSearches: DocketSearch[]
Expand Down
4 changes: 4 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export type { GeneralSearchParams, GeneralSearchResult } from './GeneralSearch'
export type { DownloadFileParams } from './DownloadFile'
export type { DocketSearchParams, DocketSearchResults } from './DocketSearch'
export type { NewDocketParams, NewDocketResults } from './NewDocket'
export type * as Stubs from './stubs'
1 change: 1 addition & 0 deletions test/consts/generalSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ export const SINGLE_PAGE_SEARCH_PARAMS: GeneralSearchParams = {
groupBy: 'NONE',
idolResultID: '',
allDates: false,
curPage: 0,
}
2 changes: 1 addition & 1 deletion test/newDocket.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest'
import NewDocketSearch from '~/search/newDocket'
import { DEFAULT_NEW_DOCKET_SEARCH } from './consts/newDocketSearch'
// import { DEFAULT_NEW_DOCKET_SEARCH } from './consts/newDocketSearch'

describe.concurrent('New Docket Search', () => {
test('Default Search', async () => {
Expand Down
6 changes: 6 additions & 0 deletions typedoc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('typedoc').TypeDocOptions} */
export default {
// plugin: ['typedoc-plugin-markdown'],
entryPoints: ['./src/index.ts'],
githubPages: true,
}

0 comments on commit 4639a4e

Please sign in to comment.