Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
created frontend dir and created a template to work from
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Mansfield authored and kaimsfd committed Sep 27, 2023
1 parent b49092f commit efe60ed
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"extensions": [
"redhat.vscode-yaml",
"tsandall.opa",
"ms-kubernetes-tools.vscode-kubernetes-tools"
"ms-kubernetes-tools.vscode-kubernetes-tools",
"esbenp.prettier-vscode"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
--all-targets
--all-features
--
--deny warnings
--deny warnings
test:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/frontend-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Frontend Code

#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [main]
# Remove the line above to run when pushing to master or main
pull_request:
branches: [main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

############################################
# Grant status permission for MULTI_STATUS #
############################################
permissions:
contents: read
packages: read
statuses: write

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: actions/setup-node@v3
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: .*README.md.*
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install
- run: yarn test
16 changes: 16 additions & 0 deletions frontend/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "xchemlab frontend",
"image": "docker.io/library/node:20.6.0-bookworm",
"runArgs": [
"--security-opt=label=type:container_runtime_t"
],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.vscode-typescript-next",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
}
}
5 changes: 5 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/

npm-debug.log*
yarn-debug.log*
yarn-error.log*
46 changes: 46 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "xchemlab-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"eslint": "8.49.0",
"eslint-config-react-app": "^7.0.1",
"eslint-webpack-plugin": "^4.0.1",
"prettier": "3.0.3",
"react-scripts": "5.0.1",
"typescript": "5.2.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --jsx-single-quote --print-width 100 --write src/**/*.{ts,tsx,css}"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
14 changes: 14 additions & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"jsx": "react",
"outDir": "./build",
"allowJs": true,
"target": "es5",
"useUnknownInCatchVariables": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": [
"./src/**/*"
]
}

0 comments on commit efe60ed

Please sign in to comment.