Skip to content

Commit

Permalink
migrated to vite builder to allow support of latest typescript and to…
Browse files Browse the repository at this point in the history
… remove legacy react-scripts
  • Loading branch information
mrtmeeseeks committed Sep 23, 2024
1 parent de29056 commit c7648dd
Show file tree
Hide file tree
Showing 70 changed files with 15,130 additions and 34,243 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

71 changes: 0 additions & 71 deletions .eslintrc.json

This file was deleted.

22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ ENV PATH /app/node_modules/.bin:$PATH
ENV GENERATE_SOURCEMAP=false
ENV NODE_OPTIONS=--openssl-legacy-provider

ARG REACT_APP_NETWORK_ENV
ARG REACT_APP_API_URL
ARG REACT_APP_NODE_ENV
ARG REACT_APP_DEFAULT_CHAIN_ID
ARG REACT_APP_GRAPH_API_URL

ENV REACT_APP_NETWORK_ENV=$REACT_APP_NETWORK_ENV
ENV REACT_APP_API_URL=$REACT_APP_API_URL
ENV REACT_APP_NODE_ENV=$REACT_APP_NODE_ENV
ENV REACT_APP_DEFAULT_CHAIN_ID=$REACT_APP_DEFAULT_CHAIN_ID
ENV REACT_APP_GRAPH_API_URL=$REACT_APP_GRAPH_API_URL
ARG VITE_NETWORK_ENV
ARG VITE_API_URL
ARG VITE_NODE_ENV
ARG VITE_DEFAULT_CHAIN_ID
ARG VITE_GRAPH_API_URL

ENV VITE_NETWORK_ENV=$VITE_NETWORK_ENV
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_NODE_ENV=$VITE_NODE_ENV
ENV VITE_DEFAULT_CHAIN_ID=$VITE_DEFAULT_CHAIN_ID
ENV VITE_GRAPH_API_URL=$VITE_GRAPH_API_URL

# COPY .npmrc ./
COPY package.json ./
Expand Down
48 changes: 0 additions & 48 deletions config-overrides.js

This file was deleted.

20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ services:
context: .
dockerfile: Dockerfile
args:
REACT_APP_NETWORK_ENV: "mainnet"
REACT_APP_API_URL: "https://mainnet-api.aut.id/api"
REACT_APP_NODE_ENV: "production"
REACT_APP_DEFAULT_CHAIN_ID: "137"
REACT_APP_GRAPH_API_URL: "https://subgraph.satsuma-prod.com/57f77e118c8e/3zi14w18sr5q42jggc1n6a--464735/aut-mainnet/api"
VITE_NETWORK_ENV: "mainnet"
VITE_API_URL: "https://mainnet-api.aut.id/api"
VITE_NODE_ENV: "production"
VITE_DEFAULT_CHAIN_ID: "137"
VITE_GRAPH_API_URL: "https://subgraph.satsuma-prod.com/57f77e118c8e/3zi14w18sr5q42jggc1n6a--464735/aut-mainnet/api"
ports:
- "5003:80"

Expand All @@ -21,10 +21,10 @@ services:
context: .
dockerfile: Dockerfile
args:
REACT_APP_NETWORK_ENV: "testnet"
REACT_APP_API_URL: "https://testnet-api.aut.id/api"
REACT_APP_NODE_ENV: "development"
REACT_APP_DEFAULT_CHAIN_ID: "80002"
REACT_APP_GRAPH_API_URL: "https://subgraph.satsuma-prod.com/57f77e118c8e/3zi14w18sr5q42jggc1n6a--464735/aut-amoy/api"
VITE_NETWORK_ENV: "testnet"
VITE_API_URL: "https://testnet-api.aut.id/api"
VITE_NODE_ENV: "development"
VITE_DEFAULT_CHAIN_ID: "80002"
VITE_GRAPH_API_URL: "https://subgraph.satsuma-prod.com/57f77e118c8e/3zi14w18sr5q42jggc1n6a--464735/aut-amoy/api"
ports:
- "5003:80"
34 changes: 34 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["build", "node_modules", ".svg"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true }
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": "off",
"react-refresh/only-export-components": "off",
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-unused-expressions": "off"
}
}
);
35 changes: 35 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link
rel="icon"
href="/favicon-light.ico"
media="(prefers-color-scheme: light)"
/>
<link
rel="icon"
href="/favicon-dark.ico"
media="(prefers-color-scheme: dark)"
/>

<meta name="viewport" content="initial-scale=1, width=device-width" />
<meta name="theme-color" content="#141414" />
<meta
name="description"
content="ĀutOS is the social map of your Web3 Reputation,
A Web of Trust – where you get in by opting out."
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="http://fonts.cdnfonts.com/css/avenir" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
<title>ĀutOS</title>
</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>
</body>
</html>
Loading

0 comments on commit c7648dd

Please sign in to comment.