Skip to content

Commit

Permalink
(docs) Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jul 13, 2023
1 parent 69a36f5 commit 31afb71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ to the [`package.json` docs](https://docs.npmjs.com/cli/v7/configuring-npm/packa
## The application 💻

Now open
[`src/index.ts`](https://github.com/openmrs/openmrs-esm-template-app/blob/master/src/index.ts).
[`src/index.ts`](https://github.com/openmrs/openmrs-esm-template-app/blob/main/src/index.ts).
The rest of the tour is in the comments in that file and the components
it uses.
26 changes: 2 additions & 24 deletions docs/main/creating_a_microfrontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ to get your frontend module started.

All frontend modules have an `index.ts` as an
[entry point](https://webpack.js.org/concepts/entry-points/).
See the [example](https://github.com/openmrs/openmrs-esm-template-app/blob/master/src/index.ts)
See the [example](https://github.com/openmrs/openmrs-esm-template-app/blob/main/src/index.ts)
in openmrs-esm-template-app.

This file is loaded by the app shell and must have a specific structure.
Expand Down Expand Up @@ -103,28 +103,6 @@ Here is an example which uses all of the possible keys.
};
```

#### Creating a page

Creating a page is a simple matter of creating the page as an application
in your framework of choice and then adding a loader to the `pages` array.
For example, you can create a React application as the default export
of a file `goodbye.tsx`. See
[`hello.tsx`](https://github.com/openmrs/openmrs-esm-template-app/blob/master/src/hello.tsx)
for reference. You could then add this as a page to the application:

```typescript
pages: [
{
load: getAsyncLifecycle(() => import('./hello'), options),
route: 'hello',
},
{
load: getAsyncLifecycle(() => import('./goodbye'), options),
route: 'goodbye'
}
],
```

### The `backendDependencies` object

This is an object that tells the frontend application what OpenMRS server modules
Expand All @@ -135,7 +113,7 @@ met, administrators will be alerted.

This is required for translations to work. It tells the frontend application
how to load translation strings. The boilerplate which you will find in
[openmrs-esm-template-app](https://github.com/openmrs/openmrs-esm-template-app/blob/master/src/index.ts)
[openmrs-esm-template-app](https://github.com/openmrs/openmrs-esm-template-app/blob/main/src/index.ts)
is almost certainly what you want. Note that the first argument to
`require.context` is a directory, `../translations`.
That directory must exist at that location relative to the `index.ts` file.
Expand Down

0 comments on commit 31afb71

Please sign in to comment.