-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wise-king-sullyman/extend-in-code-document…
…ation feat(docs): Add in code documentation for things other than props
- Loading branch information
Showing
6 changed files
with
730 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Upload GitHub Pages artifact" | ||
description: "A composite action that prepares your static assets to be deployed to GitHub Pages" | ||
author: "GitHub" | ||
inputs: | ||
name: | ||
description: 'Artifact name' | ||
required: false | ||
default: 'github-pages' | ||
path: | ||
description: "Path of the directory containing the static assets." | ||
required: true | ||
default: "/docs" | ||
retention-days: | ||
description: "Duration after which artifact will expire in days." | ||
required: false | ||
default: "1" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Archive artifact | ||
shell: sh | ||
if: runner.os == 'Linux' | ||
run: | | ||
chmod -c -R +rX "$INPUT_PATH" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
tar \ | ||
--dereference --hard-dereference \ | ||
--directory "$INPUT_PATH" \ | ||
-cvf "$RUNNER_TEMP/artifact.tar" \ | ||
--exclude=.git \ | ||
--exclude=.github \ | ||
. | ||
env: | ||
INPUT_PATH: ${{ inputs.path }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ runner.temp }}/artifact.tar | ||
retention-days: ${{ inputs.retention-days }} | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const TypeDoc = require("typedoc"); | ||
const path = require('path'); | ||
|
||
async function typeDocGen(entryPoint, tsconfigLocation) { | ||
const app = new TypeDoc.Application(); | ||
|
||
// If you want TypeDoc to load tsconfig.json / typedoc.json files | ||
app.options.addReader(new TypeDoc.TSConfigReader()); | ||
app.options.addReader(new TypeDoc.TypeDocReader()); | ||
|
||
app.bootstrap({ | ||
// typedoc options here | ||
entryPointStrategy: 'expand', | ||
entryPoints: [entryPoint], | ||
tsconfig: tsconfigLocation | ||
}); | ||
|
||
const project = app.convert(); | ||
|
||
if (project) { | ||
// Project may not have converted correctly | ||
const outputDir = "docs"; | ||
|
||
// Rendered docs | ||
await app.generateDocs(project, outputDir); | ||
// Alternatively generate JSON output | ||
// await app.generateJson(project, outputDir + "/documentation.json"); | ||
} | ||
} | ||
|
||
const packageBase = require.resolve('@patternfly/react-topology').replace('dist/esm/index.js', '') | ||
const entry = path.relative(process.cwd(), path.join(packageBase, 'src')) | ||
const configLocation = path.relative(process.cwd(), path.join(packageBase, 'tsconfig.json')) | ||
|
||
typeDocGen(entry, configLocation).catch(console.error); | ||
|
Oops, something went wrong.