Skip to content

Commit

Permalink
1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Jan 27, 2023
1 parent 17920f2 commit ab1f3d1
Show file tree
Hide file tree
Showing 91 changed files with 25,454 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"plugins": [
"react-intl-auto"
],
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": "false",
"node": "current"
}
}
],
"@babel/preset-react",
"@babel/preset-typescript"
]
}
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_APPLICATIONINSIGHTS_INSTRUMENTATION_KEY={{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}
VITE_MSAL_AUTHORITY={{MSAL_AUTHORITY}}
VITE_MSAL_CLIENT_ID={{MSAL_CLIENT_ID}}
180 changes: 180 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"standard"
],
"plugins": [
"hooks"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"array-bracket-spacing": [
"error",
"always",
{
"arraysInArrays": false
}
],
"arrow-parens": [
"error",
"always"
],
"arrow-spacing": "error",
"hooks/sort": [
"error",
{
"groups": [
"useContext",
"useError",
"useMsal",
"useStore",
"useService",
"useReducer",
"useState",
"useRef",
"useDispatch",
"useCallback",
"useEffect"
]
}
],
"key-spacing": [
"error",
{
"afterColon": true
}
],
"multiline-ternary": [
"error",
"never"
],
"no-alert": "error",
"no-console": [
"warn",
{
"allow": [
"error"
]
}
],
"no-var": "error",
"no-unused-vars": "off",
"no-use-before-define": "off",
"padded-blocks": "off",
"semi": [
"error",
"always"
],
"sort-imports": "off",
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": "error",
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
},
{
"pattern": "{react-**,react-dom/**,}",
"group": "builtin",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": [
"builtin"
],
"alphabetize": {
"order": "asc"
},
"newlines-between": "always"
}
],
"react/jsx-closing-bracket-location": [
"error",
"after-props"
],
"react/jsx-first-prop-new-line": [
"error",
"multiline"
],
"react/jsx-indent": [
"error",
2
],
"react/jsx-indent-props": [
"error",
2
],
"react/jsx-max-props-per-line": [
"error",
{
"maximum": 1
}
],
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"multiline": "last",
"reservedFirst": true
}
],
"react/jsx-tag-spacing": [
"error",
{
"beforeSelfClosing": "always"
}
],
"react/no-unknown-property": [
"error",
{
"ignore": [
"css"
]
}
],
"react/prop-types": "off"
}
}
60 changes: 60 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
environment:
name: development
steps:
- name: Checkout repos
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Rewrite .env
shell: pwsh
run: |
$content = Get-Content -Path .env
$content = $content -replace "{{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}", "${{secrets.APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}"
$content = $content -replace "{{MSAL_AUTHORITY}}", "${{secrets.MSAL_AUTHORITY}}"
$content = $content -replace "{{MSAL_CLIENT_ID}}", "${{secrets.MSAL_CLIENT_ID}}"
Out-File -FilePath .env -InputObject $content -Encoding UTF8
- name: Build source
run: |
npm ci
npm run build
- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: hitofude
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: development
steps:
- name: Download build files
uses: actions/download-artifact@v3
with:
name: hitofude
path: artifact
- name: Connect to Azure
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob delete-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --source '$web'
az storage blob upload-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --auth-mode key --destination '$web' --source artifact
- name: Purge CDN endpoint
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --content-paths '/*' --profile-name ${{secrets.AZURE_CDN_PROFILE_NAME}} --name ${{secrets.AZURE_CDN_ENDPOINT_NAME}} --resource-group ${{secrets.AZURE_RESOURCE_GROUP_NAME}}
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Checkout repos
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Rewrite .env
shell: pwsh
run: |
$content = Get-Content -Path .env
$content = $content -replace "{{APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}", "${{secrets.APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}}"
$content = $content -replace "{{MSAL_AUTHORITY}}", "${{secrets.MSAL_AUTHORITY}}"
$content = $content -replace "{{MSAL_CLIENT_ID}}", "${{secrets.MSAL_CLIENT_ID}}"
Out-File -FilePath .env -InputObject $content -Encoding UTF8
- name: Build source
run: |
npm ci
npm run build
- name: Upload build files
uses: actions/upload-artifact@v3
with:
name: hitofude
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Download build files
uses: actions/download-artifact@v3
with:
name: hitofude
path: artifact
- name: Connect to Azure
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob delete-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --source '$web'
az storage blob upload-batch --account-name ${{secrets.AZURE_STORAGE_ACCOUNT_NAME}} --auth-mode key --destination '$web' --source artifact
- name: Purge CDN endpoint
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --content-paths '/*' --profile-name ${{secrets.AZURE_CDN_PROFILE_NAME}} --name ${{secrets.AZURE_CDN_ENDPOINT_NAME}} --resource-group ${{secrets.AZURE_RESOURCE_GROUP_NAME}}
Loading

0 comments on commit ab1f3d1

Please sign in to comment.