Skip to content

Commit

Permalink
documentation: fix typos and update TypeDoc documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniave committed Sep 18, 2023
1 parent 7976e20 commit 19e84e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion docs/RepositoryGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ starter
├── .eslintignore -- Lists files ignored by ESLint
├── .eslintrc -- ESLint configuration file
├── .gitignore -- Lists files ignored by git
├── .npmrc -- pnpm configuration file
├── .prettierrc -- Prettier configuration file
├── .syncpackrc.cjs -- Syncpack configuration file
├── package.json -- Dependencies of the root package (mostly development tools)
├── pnpm-lock.yaml -- Package manager lockfile
├── pnpm-workspace.yaml -- Workspaces configuration file for pnpm
├── tsconfig.json -- Main TypeScript configuration file for code that runs in the browser
├── tsconfig.node.json -- Additional TypeScript configuration file for files running in Node
├── typedoc.base.json -- TypeDoc configuration that is used as a base for the TypeDoc configuration in the packages
├── typedoc.config.cjs -- TypeDoc main configuration file
└── vite.config.ts -- Vite configuration file
```

Expand Down Expand Up @@ -63,7 +66,9 @@ The main configuration file for vite is `vite.config.ts`.
### `pnpm run build-docs`

Builds the project's API documentation.
Documentation is generated using [TypeDoc](https://typedoc.org/) and is configured in the main `tsconfig.json` (key `"typedocOptions"`).
Documentation is generated using [TypeDoc](https://typedoc.org/). TypeDoc is configured in the main `typedoc.config.cjs`
to specify what files TypeDoc reads. In the packages, a `typedoc.json` file specifies how the input is converted.
The `typedoc.base.json` file is used as a base for the typedoc configuration specified in the single packages.
The API documentation is written into `dist/docs`.

### `pnpm run build-license-report`
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/Services.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If a reference cannot be satisfied, the application will refuse to start with a

### Using a service from the UI

Services can also be used directly from react components.
Services can also be used directly from React components.
Just like services, the UI must declare its dependencies before it can reference any service:

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/HowToCreateUiComponents.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to create UI components

When developing applications with the open pioneer client framework, [React](https://reactjs.org/) can be used to create UI Components.
When developing applications with the open pioneer client framework, [React](https://reactjs.org/) can be used to create UI components.
We can also use pre-defined components from the [Chakra UI](https://chakra-ui.com/) framework.

## Documentation
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/HowToUseAService.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ For this example, we will build upon the example from previous section.
We will move the logic of updating the element's attribute into a service.
The new service will reference `"runtime.ApplicationContext"`, and the UI will be changed to reference our new service instead.

To define our new service - which we will call `AttributeService` - we create a `service.ts` file in our application package.
To define our new service - which we will call `AttributeService` - we create a `services.ts` file in our application package.
When searching for the implementation of a service, the framework will try to import it from a file called `<PACKAGE_NAME>/services.ts` (or `.js`) by default.
If the file does not exist, or if it does not contain a matching `export`, an error will be generated.
Thus, make sure to add an export in there.
Expand Down Expand Up @@ -163,7 +163,7 @@ export class AttributeService {
// (3)
updateAttribute(count: number) {
const host = this._ctx.getHostElement();
host.setAttribute("data-clicked", String(newCount));
host.setAttribute("data-clicked", String(count));
}
}
```
Expand Down

0 comments on commit 19e84e3

Please sign in to comment.