Skip to content

Commit

Permalink
Merge pull request #20 from IFRCGo/feat/upgrade-packages
Browse files Browse the repository at this point in the history
Upgrade and clean up packages
  • Loading branch information
barshathakuri authored Mar 27, 2024
2 parents 049ecc6 + 920160c commit 9076d7f
Show file tree
Hide file tree
Showing 15 changed files with 1,280 additions and 1,129 deletions.
22 changes: 16 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@
<meta charset="UTF-8" />
<link
rel="icon"
href="/favicon.ico"
sizes="48x48"
>
<link
rel="icon"
href="/icon.svg"
sizes="any"
type="image/svg+xml"
href="#"
/>
>
<link
rel="apple-touch-icon"
href="/apple-touch-icon.png"
>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<meta
name="description"
content=""
content="IFRC Alert Hub provides global emergency alerts, empowering communities to protect lives and livelihoods."
/>
<title>
%APP_TITLE%
Expand All @@ -31,9 +41,9 @@
padding: 0;
}

body {
font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body {
font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

@media screen {
body {
Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"name": "alert-hub",
"name": "ifrc-alert-hub",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"generate": "graphql-codegen --config codegen.yml && eslint --fix src/generated/types.ts",
"lint:js": "eslint src",
"lint:css": "stylelint \"./src/**/*.css\"",
"lint:unused": "unimported",
"lint": "yarn lint:js && yarn lint:css && yarn lint:unused",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"test:coverage": "vitest run --coverage",
"typecheck": "tsc"
},
"dependencies": {
"@apollo/client": "^3.9.7",
"@apollo/client": "^3.9.9",
"@graphql-codegen/introspection": "^4.0.3",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@ifrc-go/icons": "^1.3.3",
"@sentry/react": "^7.81.1",
"@sentry/react": "^7.108.0",
"@togglecorp/fujs": "^2.1.1",
"@togglecorp/re-map": "^0.2.0-beta-6",
"graphql": "^16.8.1",
Expand All @@ -30,17 +31,17 @@
"react-router-dom": "^6.22.3"
},
"devDependencies": {
"@eslint/eslintrc": "^2.0.3",
"@eslint/eslintrc": "^3.0.2",
"@julr/vite-plugin-validate-env": "^1.0.1",
"@types/mapbox-gl": "^1.13.0",
"@types/node": "^20.1.3",
"@types/react": "^18.0.28",
"@types/node": "^20.11.30",
"@types/react": "^18.2.70",
"@types/react-dom": "^18.2.22",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.14",
"autoprefixer": "^10.4.19",
"cross-var": "^1.1.0",
"dotenv-cli": "^7.2.1",
"eslint": "^8.40.0",
Expand All @@ -52,28 +53,27 @@
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-react-refresh": "^0.4.6",
"eslint-plugin-simple-import-sort": "^12.0.0",
"fast-glob": "^3.3.0",
"happy-dom": "^9.18.3",
"postcss": "^8.3.0",
"happy-dom": "^14.3.8",
"postcss": "^8.4.38",
"postcss-nested": "^6.0.1",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^8.3.2",
"postcss-preset-env": "^9.5.2",
"postinstall-postinstall": "^2.1.0",
"rollup-plugin-visualizer": "^5.9.0",
"stylelint": "^15.6.1",
"stylelint-config-concentric": "^2.0.2",
"stylelint-config-recommended": "^12.0.0",
"stylelint": "^15.11.0",
"stylelint-config-concentric-order": "^5.2.0",
"stylelint-config-recommended": "^14.0.0",
"stylelint-no-unused-selectors": "git+https://github.com/toggle-corp/stylelint-no-unused-selectors#e0831e1",
"stylelint-value-no-unknown-custom-properties": "^4.0.0",
"stylelint-value-no-unknown-custom-properties": "^5.0.0",
"surge": "^0.23.1",
"typescript": "^5.0.4",
"unimported": "1.28.0",
"vite": "^5.0.10",
"typescript": "^5.4.3",
"unimported": "1.31.1",
"vite": "^5.2.6",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-compression2": "^0.11.0",
"vite-plugin-radar": "^0.9.2",
"vite-plugin-compression2": "^1.0.0",
"vite-plugin-svgr": "^4.2.0",
"vite-plugin-webfont-dl": "^3.9.1",
"vite-tsconfig-paths": "^4.2.2",
Expand Down
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions public/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "IFRC Alert Hub",
"short_name": "Alert Hub",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#F5333F",
"background_color": "#FFFFFF",
"display": "standalone"
}
14 changes: 0 additions & 14 deletions src/declarations/env.d.ts

This file was deleted.

10 changes: 10 additions & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="vite/client" />

type ImportMetaEnvAugmented = import('@julr/vite-plugin-validate-env').ImportMetaEnvAugmented<
typeof import('../env').default
>

interface ImportMetaEnv extends ImportMetaEnvAugmented {
// Now import.meta.env is totally type-safe and based on your `env.ts` schema definition
// You can also add custom variables that are not defined in your schema
}
54 changes: 27 additions & 27 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@
--go-ui-font-size-3xl: calc(var(--base-font-size) * 1.875);
--go-ui-font-size-4xl: calc(var(--base-font-size) * 2.375);

@media screen and (max-width: 40rem) {
--go-ui-font-size-2xs: calc(var(--base-font-size) * 0.625);
--go-ui-font-size-xs: calc(var(--base-font-size) * 0.75);
--go-ui-font-size-sm: calc(var(--base-font-size) * 0.875);
--go-ui-font-size-md: calc(var(--base-font-size) * 1);
--go-ui-font-size-lg: calc(var(--base-font-size) * 1.125);
--go-ui-font-size-xl: calc(var(--base-font-size) * 1.25);
--go-ui-font-size-2xl: calc(var(--base-font-size) * 1.4);
--go-ui-font-size-3xl: calc(var(--base-font-size) * 1.6);
--go-ui-font-size-4xl: calc(var(--base-font-size) * 1.8);
}


--go-ui-height-icon-multiplier: 1.33em;

Expand Down Expand Up @@ -70,21 +58,6 @@
--go-ui-spacing-4xl: calc(var(--base-spacing) * 7.5937);
--go-ui-spacing-5xl: calc(var(--base-spacing) * 11.39);

@media screen and (max-width: 40rem) {
--go-ui-spacing-4xs: calc(var(--base-spacing) * 0.0625);
--go-ui-spacing-3xs: calc(var(--base-spacing) * 0.125);
--go-ui-spacing-2xs: calc(var(--base-spacing) * 0.25);
--go-ui-spacing-xs: calc(var(--base-spacing) * 0.4);
--go-ui-spacing-sm: calc(var(--base-spacing) * 0.625);
--go-ui-spacing-md: calc(var(--base-spacing) * 1);
--go-ui-spacing-lg: calc(var(--base-spacing) * 1.25);
--go-ui-spacing-xl: calc(var(--base-spacing) * 1.5625);
--go-ui-spacing-2xl: calc(var(--base-spacing) * 1.95);
--go-ui-spacing-3xl: calc(var(--base-spacing) * 2.44);
--go-ui-spacing-4xl: calc(var(--base-spacing) * 3);
--go-ui-spacing-5xl: calc(var(--base-spacing) * 3.8);
}

--go-ui-width-separator-sm: 1pt;
--go-ui-width-separator-md: 2pt;
--go-ui-width-separator-lg: 4pt;
Expand Down Expand Up @@ -231,6 +204,33 @@
--mapbox-icon-width: 88px;

--go-ui-export-page-margin: 10mm 10mm 16mm 10mm;

@media screen and (max-width: 40rem) {
--go-ui-font-size-2xs: calc(var(--base-font-size) * 0.625);
--go-ui-font-size-xs: calc(var(--base-font-size) * 0.75);
--go-ui-font-size-sm: calc(var(--base-font-size) * 0.875);
--go-ui-font-size-md: calc(var(--base-font-size) * 1);
--go-ui-font-size-lg: calc(var(--base-font-size) * 1.125);
--go-ui-font-size-xl: calc(var(--base-font-size) * 1.25);
--go-ui-font-size-2xl: calc(var(--base-font-size) * 1.4);
--go-ui-font-size-3xl: calc(var(--base-font-size) * 1.6);
--go-ui-font-size-4xl: calc(var(--base-font-size) * 1.8);
}

@media screen and (max-width: 40rem) {
--go-ui-spacing-4xs: calc(var(--base-spacing) * 0.0625);
--go-ui-spacing-3xs: calc(var(--base-spacing) * 0.125);
--go-ui-spacing-2xs: calc(var(--base-spacing) * 0.25);
--go-ui-spacing-xs: calc(var(--base-spacing) * 0.4);
--go-ui-spacing-sm: calc(var(--base-spacing) * 0.625);
--go-ui-spacing-md: calc(var(--base-spacing) * 1);
--go-ui-spacing-lg: calc(var(--base-spacing) * 1.25);
--go-ui-spacing-xl: calc(var(--base-spacing) * 1.5625);
--go-ui-spacing-2xl: calc(var(--base-spacing) * 1.95);
--go-ui-spacing-3xl: calc(var(--base-spacing) * 2.44);
--go-ui-spacing-4xl: calc(var(--base-spacing) * 3);
--go-ui-spacing-5xl: calc(var(--base-spacing) * 3.8);
}
}

* {
Expand Down
4 changes: 2 additions & 2 deletions stylelint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
plugins: [
'stylelint-no-unused-selectors',
'stylelint-value-no-unknown-custom-properties'
'stylelint-value-no-unknown-custom-properties',
],
extends: [
'stylelint-config-recommended',
'stylelint-config-concentric',
'stylelint-config-concentric-order',
],
rules: {
'plugin/no-unused-selectors': {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src", "env.ts"],
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
2 changes: 1 addition & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
"include": ["vite.config.ts", "env.ts"]
}
Loading

0 comments on commit 9076d7f

Please sign in to comment.