Skip to content

Commit

Permalink
init eva-web-react
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-ebi committed Jun 26, 2024
1 parent 2cbbd57 commit c257c3e
Show file tree
Hide file tree
Showing 71 changed files with 5,793 additions and 25,537 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {browser: true, es2020: true},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{allowConstantExport: true},
],
},
}
27 changes: 0 additions & 27 deletions .github/workflows/tests.yml

This file was deleted.

24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
dist
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
# web-prototype
# React + TypeScript + Vite

Prototypes for new website components in React.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

## Build
Currently, two official plugins are available:

Uses [Node.js](https://nodejs.org/en/) version 16 and [npm](https://www.npmjs.com/) version 8. (You can use [nvm](https://github.com/nvm-sh/nvm) to install both and conveniently switch between node versions.) Then run the following as needed:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md)
uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast
Refresh

```shell
# Install dependencies
npm install
## Expanding the ESLint configuration

# Run development server with hot reloading
npm start
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

# Build development package
npm run build
- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked`
or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and
add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link href="src/assets/logos/eva/eva_logo.png" rel="icon" type="image/svg+xml"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>European Variation Archive</title>
<style>
body {margin: 0}
</style>
</head>
<body>
<div id="root"></div>
<script src="/src/index.tsx" type="module"></script>
</body>
</html>
4 changes: 0 additions & 4 deletions jest.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions jest.setup.js

This file was deleted.

Loading

0 comments on commit c257c3e

Please sign in to comment.