forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial vite migration * fix npm dev command * add workaround for react-phone-input-2 * pin node v18 * fix storybook and pwa * remove node 16 engine from package.json * prune packages * Fix PUBLIC_URL env * storybook: adds required font * storybook: upgrade to SB v7, run migration scripts * storybook: remove * storybook: setup from scratch, add stories * storybook: use vite builder and update out dir * storybook: fix build command * storybook: fix missing include in vite config * storybook: revert to default out dir * add missing entry for VITE_PUBLIC_URL * update readme and cypress workflow * cypress: fix rescript build command * remove hardcoded variables from index.html * change env variables prefix to REACT_ to maintain compatibility * remove cra service worker files * fix service worker implementation --------- Co-authored-by: Ashesh3 <[email protected]> Co-authored-by: rithviknishad <[email protected]> Co-authored-by: Rithvik Nishad <[email protected]>
- Loading branch information
1 parent
049ffb6
commit 89120b2
Showing
62 changed files
with
20,266 additions
and
70,444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
auto-install-peers=true | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.15.0 | ||
v18 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
staticDirs: ["../public"], | ||
core: { | ||
builder: { | ||
name: "@storybook/builder-vite", | ||
options: { | ||
viteConfigPath: "./.storybook/vite.config.ts", | ||
}, | ||
}, | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Preview } from "@storybook/react"; | ||
import "../src/style/index.css"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineConfig } from "vite"; | ||
|
||
export default defineConfig({ | ||
esbuild: { | ||
loader: "tsx", | ||
include: [/src\/.*\.[tj]sx?$/, /.storybook\/.*\.[tj]sx?$/], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#build-stage | ||
FROM node:lts-buster-slim as build-stage | ||
FROM node:18-buster-slim as build-stage | ||
|
||
WORKDIR /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" | ||
/> | ||
<title>%REACT_APP_TITLE%</title> | ||
<meta name="description" content="%REACT_APP_META_DESCRIPTION%" /> | ||
<meta property="og:title" content="%REACT_APP_TITLE%" /> | ||
<meta property="og:description" content="%REACT_APP_META_DESCRIPTION%" /> | ||
<meta property="og:image" content="%REACT_APP_COVER_IMAGE%" /> | ||
<meta property=" og:url" content="%REACT_PUBLIC_URL%" /> | ||
<meta property="og:site_name" content="%REACT_APP_TITLE%" /> | ||
<meta name="twitter:title" content="%REACT_APP_TITLE%" /> | ||
<meta name="twitter:description" content="%REACT_APP_META_DESCRIPTION%" /> | ||
<meta name="twitter:image" content="%REACT_APP_COVER_IMAGE%" /> | ||
<meta name="twitter:card" content="summary" /> | ||
<meta name="mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="default" /> | ||
<meta name="apple-mobile-web-app-title" content="Care" /> | ||
<meta name="theme-color" content="#33BB17" /> | ||
<link rel="shortcut icon" href="/favicon-dark.ico" type="image/x-icon" /> | ||
<link | ||
rel="apple-touch-icon" | ||
href="https://cdn.coronasafe.network/care-manifest/images/icons/icon-192x192.png" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
|
||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
<script | ||
src="https://kit.fontawesome.com/d69454c2e7.js" | ||
crossorigin="anonymous" | ||
></script> | ||
<script | ||
defer | ||
data-domain="%REACT_APP_SITE_URL%" | ||
src="%REACT_APP_ANALYTICS_SERVER_URL%/js/script.js" | ||
></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.