Skip to content

Commit

Permalink
fix(nxdoc): nxdocs fails to run if any file does not have getting sta…
Browse files Browse the repository at this point in the history
…rted text
  • Loading branch information
AgentEnder committed May 24, 2021
1 parent e1b58a6 commit f6b800f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 60 deletions.
1 change: 0 additions & 1 deletion docs/core/executors/format.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Formats and lints a project using the dotnet-format tool

### diagnostics

-
- (string): A space separated list of diagnostic ids to use as a filter when fixing code style or 3rd party analyzers.
- (array): A list of diagnostic ids to use as a filter when fixing code style or 3rd party analyzers.

Expand Down
29 changes: 0 additions & 29 deletions docs/typescript/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,4 @@ sidebar_position: 0
slug: /typescript/
---

# Getting Started

> The features for this package are not yet implemented. This package will be used to generate typescript interfaces given a web-api project in the future.
## Prerequisites

- Have an existing nx workspace. For creating this, see [nrwl's documentation](https://nx.dev/latest/angular/getting-started/nx-setup).
- .NET SDK is installed, and `dotnet` is available on the path. For help on this, see [Microsoft's documentation](https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install)

## Installation

### NPM

```shell
npm i --save-dev @nx-dotnet/typescript
```

### PNPM

```shell
pnpm i --save-dev @nx-dotnet/typescript
```

### Yarn

```shell
yarn add --dev @nx-dotnet/typescript
```

# API Reference
8 changes: 6 additions & 2 deletions packages/nxdoc/src/generators/generate-docs/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ export default async function (host: Tree, options: Schema) {
}[] = [];

projects.forEach((project) => {
const gettingStartedFile = options.gettingStartedFile.replace(
let gettingStartedFile: string | null = options.gettingStartedFile.replace(
'<src>',
project.root,
);

gettingStartedFile = host.exists(gettingStartedFile)
? gettingStartedFile
: null;

const generatorsCollection: GeneratorsCollection = project.generators
? readJson<GeneratorsCollection>(host, `${project.root}/generators.json`)
: ({} as GeneratorsCollection);
Expand Down Expand Up @@ -67,7 +71,7 @@ export default async function (host: Tree, options: Schema) {
generators,
executors,
underscore: '_',
gettingStartedMd: options.gettingStartedFile
gettingStartedMd: gettingStartedFile
? readFileSync(gettingStartedFile).toString()
: '',
frontMatter: options.skipFrontMatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

### <%- (schema.required?.includes?.(property)) ? `<span className="required">${property}</span>` : property %>

- <% if (!config.oneOf) { %>(<%=config.type%>): <%= config.description %>
<%} else { config.oneOf.forEach(x => {%>
<% if (!config.oneOf) { %>- (<%=config.type%>): <%= config.description %>
<%} else { config.oneOf.forEach(x => {%>

- (<%= x.type %>): <%=x.description%>
<% })}})} %>
26 changes: 0 additions & 26 deletions packages/typescript/README.md

This file was deleted.

0 comments on commit f6b800f

Please sign in to comment.