Skip to content

Commit

Permalink
feat: Improve documentation integration (powerhouse-inc#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillDogadin-std authored Jul 6, 2023
1 parent 89d40a1 commit 3dffead
Show file tree
Hide file tree
Showing 13 changed files with 377 additions and 3,617 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
frontend/node_modules
frontend/npm-debug*
frontend/.nuxt
frontend/dist
frontend/tests
frontend/.output
frontend/content/documentation/**

api/node_modules
242 changes: 242 additions & 0 deletions api/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"watch": "vitest watch"
},
"dependencies": {
"@acaldas/document-model-libs": "^1.0.15",
"@apollo/server": "^4.5.0",
"@prisma/client": "^4.11.0",
"@types/cookie-parser": "^1.4.3",
Expand Down
1 change: 1 addition & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ npm-debug*
dist
tests
.output
content/documentation/**
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules
.env
dist
*.sqlite
content/documentation
3 changes: 3 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /app/frontend
# copy the app, note .dockerignore
COPY frontend/package.json .
COPY frontend/package-lock.json .
COPY frontend/scripts ./scripts
RUN npm ci

FROM dependency-base AS production-base
Expand All @@ -18,6 +19,8 @@ FROM dependency-base AS production-base
# if necessary
COPY frontend /app/frontend
COPY api /app/api
WORKDIR /app/api
RUN npm ci
WORKDIR /app/frontend
RUN npm run build

Expand Down
14 changes: 12 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ Endpoint available at `/healthz` path. Provides response if frontend is currentl
## Documentation page

One of the frontend's features is displaying the documentation about document model.
The documentation is provided to the service externally as raw typedoc output in markdown format.
The documentation is provided to the service externally as part of the npm package.

To display the documentation on the frontend the provided data has to be processed and represented in the form of a single file.

TODO: add the precise process in separate issue
The documentation gets updated or generated before `npm run build`.

To run the generation manually:

1. Run `npm install` in the `/api` directory of the project.
2. Run `npm install` in the `/frontend` direcotry of the project.
3. Run the following command:

```sh
$ npm run generateDocs
```
Loading

0 comments on commit 3dffead

Please sign in to comment.