Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from npm to pnpm, webpack to vite #884

Merged
merged 12 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/r-frontend_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ jobs:
with:
node-version: "18"

- name: Cache Node Modules
uses: actions/cache@v3
- name: Setup pnpm
uses: pnpm/[email protected]
with:
path: |
src/frontend/node_modules
keys: node-modules-${{ env.cache_id }}
restore-keys: |
node-modules-
package_json_file: src/frontend/package.json
version: 8.8.0

- name: Test Frontend
run: |
cd src/frontend
npm ci --only-dev
npm run test
working-directory: src/frontend
run: pnpm run test
5 changes: 4 additions & 1 deletion src/frontend/debug.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ARG FRONTEND_MAIN_URL
ENV FRONTEND_MAIN_URL="${FRONTEND_MAIN_URL}"
WORKDIR /app
COPY ./package*.json ./
RUN npm install
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN pnpm install
ENV NODE_ENV development
ENTRYPOINT ["npm", "run", "start:live"]
24 changes: 24 additions & 0 deletions src/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="favicon.ico" />
<link rel="manifest" href="/manifest.json" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/openlayers/7.4.0/ol.min.css"
integrity="sha512-InhY7dfdkf2+ZyIsz9AX9M1xDC3GjEy0zVnAIudX1fTUOEhBu13KooX9txjBoWkDAMI3fQ07VE/D0gMUvweerw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<title>Field Mapping Tasking Manager</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/App.jsx"></script>
</body>
</html>
Loading
Loading