Skip to content

Commit

Permalink
Formatting and minor work (#37)
Browse files Browse the repository at this point in the history
* prettier

* remove .env from git

* add linter

* add eslint and build check

* fix css for logo centering

* remember to install

* linter fix

* maybe fix for eslint

* remove unused extends

* remove eslint

* Fix prettier yaml

* pin prettier version

* fix formatting
  • Loading branch information
SyniRon authored Sep 4, 2023
1 parent 5d6ecd9 commit 6f4b70e
Show file tree
Hide file tree
Showing 28 changed files with 1,503 additions and 634 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This is a basic workflow to help you get started with Actions

name: BUILD_CHECK

# Controls when the workflow will run
on:
pull_request:
branches:
- main
paths:
- ".github/workflows/client_adr_push.yml"
- "client/**"
- "config/client/**"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
client_deployment:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
REACT_APP_CLIENT_TOKEN: ${{ secrets.CLIENT_TOKEN }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the Repo
uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3

- name: Install Dependancies
run: npm i
working-directory: client

- name: Update Browserlist
run: npx browserslist@latest --update-db
working-directory: client

- name: Build Client to Prod
run: npm run build
working-directory: client
28 changes: 28 additions & 0 deletions .github/workflows/lint_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a basic workflow to help you get started with Actions

name: LINT_FORMAT_CHECK

# Controls when the workflow will run
on:
pull_request:
branches:
- main

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
lint_format_check:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the Repo
uses: actions/checkout@v3

- name: Prettiier
uses: creyD/[email protected]
with:
prettier_options: "--check {**/*,*}.{js,jsx,json,html,css,yml,yaml}"
prettier_version: "2.8.8"
16 changes: 8 additions & 8 deletions .github/workflows/prod_url_check.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: PROD_URL_CHECK

on:
pull_request:
branches: [ main ]
paths:
- 'client/src/App.js'
pull_request:
branches: [main]
paths:
- "client/src/App.js"

jobs:
check-url:
runs-on: ubuntu-latest
steps:
check-url:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check API URL
Expand All @@ -19,4 +19,4 @@ jobs:
exit 1
else
echo "Production API URL is present and not commented out."
fi
fi
1 change: 0 additions & 1 deletion client/.env

This file was deleted.

1 change: 1 addition & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ credentials/token.js
.env.development.local
.env.test.local
.env.production.local
client/.env

npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"last 1 safari version"
]
}
}
}
30 changes: 14 additions & 16 deletions client/public/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>7th Cavalry ADR</title>
</head>

<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>7th Cavalry ADR</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>

</html>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion client/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
}
Loading

0 comments on commit 6f4b70e

Please sign in to comment.