Make some certs in .ssl/*
:
brew install nss mkcert
mkcert -install
# Now we want to generate the cert for this project
mkdir .ssl
mkcert -cert-file .ssl/cert.pem -key-file .ssl/key.pem localhost "*.localhost" localhost 127.0.0.1 ::1
Make a .env
file:
HTTPS=true
SSL_CRT_FILE=.ssl/cert.pem
SSL_KEY_FILE=.ssl/key.pem
REACT_APP_SUPABASE_URL=https://API_URL.supabase.co
REACT_APP_SUPABASE_ANON_KEY=API_KEY
SUPABASE_OPENAPI_URL=https://API_URL.supabase.co/rest/v1/?apikey=API_KEY
REACT_APP_SOULECTION_BASE_URL=https://soulection.com/
# Can't put this into package.json due to env variables
npx openapi-typescript $SUPABASE_OPENAPI_URL --output src/types-supabase.d.ts --version 2
Optimise your files:
npx svgo -f ~/path/to/input/files ./src/icons
Import in a component:
import { ReactComponent as MyIcon } from "./icons/myicon.svg";