Skip to content

gnosis/cfp-funding-tool

 
 

Repository files navigation

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

Enviorement variables

VITE_WEB_API_URL=

Available Scripts

yarn

Install all the dependencies.

yarn dev

Runs the app in the development mode.
Open http://localhost:5173 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build

Builds the cfp-funding-tool-ui. Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

docker build -t cfp-funding-tool-ui .

Builds the cfp-funding-tool-ui docker image with the name node-admin.

docker run -d -p 3000:80 --name cfp-funding-tool-ui cfp-funding-tool-ui

Runs the cfp-funding-tool-ui container exposing the 3000 port. To access the cfp-funding-tool-ui you should go to http://localhost:3000/

Deployment process

To contribute to this repository you will need to create a pull request. More information about the existing automated workflows can be found in GitHub Actions

Releases

No releases published

Packages

No packages published

Languages

  • CSS 27.2%
  • SCSS 27.0%
  • Less 26.1%
  • JavaScript 18.4%
  • TypeScript 1.1%
  • Dockerfile 0.1%
  • HTML 0.1%