forked from projen/projen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare projen docs for GitHub pages (projen#1566)
Moving API.md to the docs directory so it can be rendered on GitHub pages. Also deleted the empty `mutable-builds.md` (file contents were moved to `build.md` some eons ago) Closes projen#1507 --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
11 changed files
with
188 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
# Documentation | ||
|
||
* [AWS CDK Applications](awscdk-apps.md) | ||
* [AWS CDK Construct Library](awscdk-construct.md) | ||
* [AWS Cloud Projects](awscdk.md) | ||
* [Build](build.md) | ||
* [Bundling](bundling.md) | ||
* [Components](components.md) | ||
* [Dependencies](deps.md) | ||
* [Escape hatches](escape-hatches.md) | ||
* [Ejecting](eject.md) | ||
* [GitLab](gitlab.md) | ||
* [Java Projects](java.md) | ||
* [Node.js Projects](node.md) | ||
* [Programmatic API](programmatic-api.md) | ||
* [Publishing Modules](publisher.md) | ||
* [Python Projects](python.md) | ||
* [Releases and Versioning](releases.md) | ||
* [Subprojects](subproject.md) | ||
* [Tasks](tasks.md) | ||
* [TypeScript Projects](typescript.md) | ||
|
||
## API Reference | ||
|
||
* [TypeScript](api/API.md) |
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
Empty file.
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 |
---|---|---|
@@ -1,22 +1,35 @@ | ||
import { JsiiProject } from "./jsii-project"; | ||
|
||
/** | ||
* Creates an API.md file based on the jsii manifest: | ||
* Options for `JsiiDocgen` | ||
*/ | ||
export interface JsiiDocgenOptions { | ||
/** | ||
* File path for generated docs. | ||
* @default "API.md" | ||
*/ | ||
readonly filePath?: string; | ||
} | ||
|
||
/** | ||
* Creates a markdown file based on the jsii manifest: | ||
* - Adds a `docgen` script to package.json | ||
* - Runs `jsii-docgen` after compilation | ||
* - Enforces that API.md is checked in | ||
* - Enforces that markdown file is checked in | ||
*/ | ||
export class JsiiDocgen { | ||
constructor(project: JsiiProject) { | ||
constructor(project: JsiiProject, options: JsiiDocgenOptions = {}) { | ||
project.addDevDeps("jsii-docgen"); | ||
|
||
const filePath = options.filePath ?? "API.md"; | ||
|
||
const docgen = project.addTask("docgen", { | ||
description: "Generate API.md from .jsii manifest", | ||
exec: "jsii-docgen", | ||
exec: `jsii-docgen -o ${filePath}`, | ||
}); | ||
|
||
// spawn docgen after compilation (requires the .jsii manifest). | ||
project.postCompileTask.spawn(docgen); | ||
project.gitignore.include("/API.md"); | ||
project.gitignore.include(`/${filePath}`); | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.