Skip to content

Commit

Permalink
docs: updated docs with local packages section (#57)
Browse files Browse the repository at this point in the history
* build: install mui icons added in package.json

Signed-off-by: Jackson Greer <[email protected]>

* build: removed icon install since part of package file now

Signed-off-by: Jackson Greer <[email protected]>

* docs: added local packages section and updated local image build to mention default setting of remote image

Signed-off-by: Jackson Greer <[email protected]>

* build: update lock file

Signed-off-by: Jackson Greer <[email protected]>

* docs: mention vscode in installing packages locally section

Signed-off-by: Jackson Greer <[email protected]>

---------

Signed-off-by: Jackson Greer <[email protected]>
  • Loading branch information
jgrer authored Aug 9, 2024
1 parent 066ce06 commit bf4b9a2
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 34 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ COPY ui/package-lock.json /ui/package-lock.json
RUN --mount=type=cache,target=/usr/src/app/.npm \
npm set cache /usr/src/app/.npm && \
npm ci
# install mui icons
RUN npm install @mui/icons-material

COPY ui /ui
RUN npm run build
Expand Down
21 changes: 18 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Before proceeding, ensure that Docker Desktop is installed on your computer and using the WSL backend if using Windows.

## Building the copa-extenion image
In order to run the extension locally, you need to build the `copa-extension` image image specified in the `/container/copa-extension` folder.
By default, the extension will pull the copa image from `ghcr.io/project-copacetic/copa-extension` and use that for the patching operation. If you would like to make modifications to this image and test locally, you need to build the `copa-extension` image image specified in the `/container/copa-extension` folder.

Run the following make command in the root directory to install it:

```
make build-copa-image
```
After the command finishes, confirm that the image `copa-extension` is listed when you run the command `docker images`.
After the command finishes, confirm that the image `copa-extension` is listed when you run the command `docker images`. Once confirmed, change the `IMAGE_NAME` variable in `app.tsx` to point to `copa-extension` instead of `ghcr.io/project-copacetic/copa-extension`.

## Building the frontend image

Expand All @@ -22,4 +22,19 @@ make build-extension
```
make install-extension
```
After following the steps, the extension should be successfully installed in Docker Desktop. If you make any changes to the code, run `make update-extension` to see those changes reflected.
After following the steps, the extension should be successfully installed in Docker Desktop. If you make any changes to the code, run `make update-extension` to see those changes reflected.

## Install node packages locally (optional)

To use Visual Studio Code IntelliSense features (code completion, parameter info, quick info, and member lists), you need to install the node and yarn packages locally.

After installing [Node.js](https://nodejs.org/en/download/package-manager/), change to the `/ui` directory and run the following command:

```
npm install
```
If making changes to the testing code in `/e2e`, run `npm install --global yarn` to install the yarn package manager and then run the following command in the `/e2e` directory:
```
yarn install
```

173 changes: 145 additions & 28 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"@docker/extension-api-client": "0.3.4",
"@emotion/react": "11.13.0",
"@emotion/styled": "11.13.0",
"@mui/material": "5.16.6",
"@mui/icons-material": "^5.16.6",
"@mui/material": "5.10.8",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down

0 comments on commit bf4b9a2

Please sign in to comment.