Skip to content

Commit

Permalink
chore(client): migrate from react-scripts build to vite (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss authored Sep 2, 2024
1 parent 7c13ea5 commit 6d36c1a
Show file tree
Hide file tree
Showing 48 changed files with 4,134 additions and 24,991 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ COPY --chown=node:node client/public ./client/public
COPY --chown=node:node client/typings ./client/typings
COPY --chown=node:node client/vcs ./client/vcs
COPY --chown=node:node client/tsconfig.json ./client/tsconfig.json
COPY --chown=node:node client/vite.config.ts ./client/vite.config.ts
COPY --chown=node:node client/index.html ./client/index.html

ENV CYPRESS_INSTALL_BINARY=0
RUN npm ci --prefix=client --no-audit
Expand All @@ -51,7 +53,7 @@ COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/package*.json ./
COPY --chown=node:node --from=build /usr/src/app/dist ./dist

COPY --chown=node:node --from=build /usr/src/app/client/build ./client/build
COPY --chown=node:node --from=build /usr/src/app/client/dist ./client/dist
COPY --chown=node:node --from=build /usr/src/app/client/vcs ./client/vcs

CMD ["npm", "run", "start:prod"]
2 changes: 1 addition & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/coverage

# production
/build
/dist

# misc
.DS_Store
Expand Down
3 changes: 2 additions & 1 deletion client/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/node_modules
/build
/dist
/public/config.js
/public/assets
/public/css
/public/vendor
/vcs
2 changes: 1 addition & 1 deletion client/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strict,
{
ignores: ['**/build/', '**/public/', '**/assets/']
ignores: ['**/dist/', '**/public/', '**/vcs/']
},
{
files: ['**/*.js'],
Expand Down
116 changes: 116 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Broken Crystals" />

<!-- Favicons -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="/favicons/apple-icon-180x180.png"
/>
<link
rel="icon"
type="image/png"
sizes="192x192"
href="/favicons/android-icon-192x192.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicons/favicon-16x16.png"
/>
<meta name="theme-color" content="#ffffff" />
<meta
name="insight-app-sec-validation"
content="38936a45-0c2c-4f3c-89c0-a26817f2a5a8"
/>
<script id="config" type="application/json" src="/api/config"></script>

<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="manifest.json" />
<title>Broken Crystals</title>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Roboto:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet"
/>

<!-- Vendor CSS Files -->
<link
href="/assets/vendor/bootstrap/css/bootstrap.min.css"
rel="stylesheet"
/>
<link href="/assets/vendor/icofont/icofont.min.css" rel="stylesheet" />
<link
href="/assets/vendor/boxicons/css/boxicons.min.css"
rel="stylesheet"
/>
<link href="/assets/vendor/venobox/venobox.css" rel="stylesheet" />
<link href="/assets/vendor/aos/aos.css" rel="stylesheet" />

<!-- Fontfaces CSS-->
<link
href="/vendor/font-awesome-4.7/css/font-awesome.min.css"
rel="stylesheet"
media="all"
/>
<link
href="/vendor/font-awesome-5/css/fontawesome-all.min.css"
rel="stylesheet"
media="all"
/>
<link
href="/vendor/mdi-font/css/material-design-iconic-font.min.css"
rel="stylesheet"
media="all"
/>

<!-- Vendor CSS-->
<link
href="/vendor/animsition/animsition.min.css"
rel="stylesheet"
media="all"
/>
<link href="/vendor/wow/animate.css" rel="stylesheet" media="all" />
<link href="/vendor/slick/slick.css" rel="stylesheet" media="all" />

<!-- Main CSS-->
<link href="/assets/css/style.css" rel="stylesheet" media="all" />
<link href="/css/theme.css" rel="stylesheet" media="all" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

<!-- Vendor JS Files -->
<script src="/assets/vendor/jquery/jquery.min.js"></script>
<script src="/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/assets/vendor/jquery.easing/jquery.easing.min.js"></script>
<script src="/assets/vendor/counterup/counterup.min.js"></script>
<script src="/assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="/assets/vendor/venobox/venobox.min.js"></script>
<script src="/assets/vendor/aos/aos.js"></script>

<!-- Vendor JS -->
<script src="/vendor/slick/slick.min.js"></script>
<script src="/vendor/wow/wow.min.js"></script>
<script src="/vendor/animsition/animsition.min.js"></script>
<script src="/vendor/counter-up/jquery.waypoints.min.js"></script>
<script src="/vendor/counter-up/jquery.counterup.min.js"></script>

<div id="root"></div>
<script type="module" src="src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 6d36c1a

Please sign in to comment.