Skip to content

Commit

Permalink
Change: Use vite as build tool
Browse files Browse the repository at this point in the history
Switch from create-react-app to vite.

For using vite it is necessary to change the file ending fo JS files
using React/JSX to `.jsx`. Otherwise vite (rollup) will raise errors.

The project is also prepared to allow using TypeScript now.
  • Loading branch information
bjoernricks committed Apr 19, 2024
1 parent 62e0ec0 commit 3e0a1c6
Show file tree
Hide file tree
Showing 1,186 changed files with 6,436 additions and 17,471 deletions.
48 changes: 0 additions & 48 deletions .clang-format

This file was deleted.

3 changes: 0 additions & 3 deletions .env

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 },
],
},
}
206 changes: 0 additions & 206 deletions .eslintrc.js

This file was deleted.

21 changes: 18 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

*.local

dist/
build/
/tags
coverage/
tags
node_modules/
.env.local

public/config.js

.vscode/
.tern-project

# directory files for image previews
.directory
coverage/

.venv
56 changes: 0 additions & 56 deletions .mergify.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierrc.js → .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
const config = {
arrowParens: 'avoid',
bracketSpacing: false,
jsxSingleQuote: false,
Expand All @@ -8,3 +8,5 @@ module.exports = {
tabWidth: 2,
trailingComma: 'all',
};

module.exports = config;
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/img/favicon.png" type="image/png"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Greenbone Security Assistant</title>
<script type="text/javascript" src="/config.js"></script>
</head>
<body>
<div id="app"></div>
<div id="portals"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading

0 comments on commit 3e0a1c6

Please sign in to comment.