Skip to content

Commit

Permalink
chore: Run Prettier format on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputasAlex committed Jul 3, 2024
1 parent d618f4d commit 168d1a5
Show file tree
Hide file tree
Showing 80 changed files with 5,272 additions and 5,327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_AMBITIOUS_POND_03D4A0710 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
action: 'upload'
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_build_command: "npm run build -- --configuration TekniskMuseumProd"
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "/dist/tekniskmuseum" # Built app content directory - optional
app_build_command: 'npm run build -- --configuration TekniskMuseumProd'
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: '/dist/tekniskmuseum' # Built app content directory - optional
###### End of Repository/Build Configurations ######
84 changes: 42 additions & 42 deletions .github/workflows/azure-static-web-apps-computas-instance.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
name: Deploy to computas instance of Kunstige Jens Azure Static Web Apps CI/CD

on:
push:
branches:
- master

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: 'upload'
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_build_command: 'npm run build -- --configuration computas'
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: '/dist/tekniskmuseum' # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }}
action: 'close'
name: Deploy to computas instance of Kunstige Jens Azure Static Web Apps CI/CD

on:
push:
branches:
- master

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: 'upload'
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_build_command: 'npm run build -- --configuration computas'
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: '/dist/tekniskmuseum' # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }}
action: 'close'
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_GROUND_07BB42C03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
action: 'upload'
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "/dist/tekniskmuseum" # Built app content directory - optional
app_location: '/' # App source code path
api_location: '' # Api source code path - optional
output_location: '/dist/tekniskmuseum' # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand All @@ -43,4 +43,4 @@ jobs:
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_GROUND_07BB42C03 }}
action: "close"
action: 'close'
86 changes: 43 additions & 43 deletions .github/workflows/github-superlinter.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
###########################
###########################
## Linter GitHub Actions ##
###########################
###########################
name: Lint Code Base
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore:
- "master"
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: docker://github/super-linter:v2.1.0
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_ANSIBLE: false
###########################
###########################
## Linter GitHub Actions ##
###########################
###########################
name: Lint Code Base
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore:
- 'master'
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: docker://github/super-linter:v2.1.0
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_ANSIBLE: false
68 changes: 34 additions & 34 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Lint & Build

on:
push:
branches-ignore:
- "master"

jobs:
build:
name: Lint & Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout ✔️
uses: actions/checkout@v4

- name: Setup bun 🥟
uses: oven-sh/setup-bun@v1

- name: Install dependencies 📝
run: bun install

- name: Run Lint 🧼
run: bun run lint

- name: Build 🛠️
run: bun run build
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Lint & Build

on:
push:
branches-ignore:
- 'master'

jobs:
build:
name: Lint & Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]

steps:
- name: Checkout ✔️
uses: actions/checkout@v4

- name: Setup bun 🥟
uses: oven-sh/setup-bun@v1

- name: Install dependencies 📝
run: bun install

- name: Run Lint 🧼
run: bun run lint

- name: Build 🛠️
run: bun run build
14 changes: 7 additions & 7 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 120,
"semi": true,
"singleQuote": true
}
{
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 120,
"semi": true,
"singleQuote": true
}
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# Tekniskmuseum

Dette er repoet som står for front-end biten av Teknisk Museum-prosjektet "Kunstig Jens". Her finner du svar på de viktigste tingene du trenger å kunne for å starte opp applikasjonen.

## Oppsett

1. Prosjektet bruker [Bun](https://bun.sh) for pakkebehandling og kjøring av kode. Om du ikke har installert Bun, kan det gjøres slik:

```shell
# For MacOS, Linux, og WSL
curl -fsSL https://bun.sh/install | bash

# For Windows
powershell -c "irm bun.sh/install.ps1|iex"
```

2. Deretter kan du installere avhengighetene i prosjektet ved å kjøre

```shell
bun install
```

3. Til slutt kan du starte opp det lokale utviklingsmiljøet ved å kjøre

```shell
bun run start
```

## Forskjellige miljøer

Om man ønsker å gå mot forskjellige miljøer, er det satt opp et sett med forskjellige konfigurasjoner i prosjektet. Disse finner man i mappen `/src/environments/`. Om man f.eks. ønsker å bruke konfigurasjonen "Computas", kan man gjøre det ved å legge til argumentet `--configuration` når man starter opp det lokale utviklingsmiljøet. Det vil si at man da kjører scriptet

```shell
bun run start --configuration computas
```

## Oppstår det problemer i teamet forbundet med bruk av Bun?

Ikke noe problem! Dere kan enkelt gå over til mer tradisjonelle verktøy som Yarn eller NPM. Da er det bare å gjøre følgende:

- Slett `bun.lockb` filen.
- Endre workflowene i `.github/workflows` til å ikke bruke Bun (dvs erstatt trinnet `uses: oven-sh/setup-bun@v1` samt andre kall som bruker Bun).
- Skriv inn ny pakkebehandler i feltet `cli.packageManager` i `angular.json`.
- Lag en ny lockfil med den nye pakkebehandleren ved å kjøre hhv. `npm i` eller `yarn`.
# Tekniskmuseum

Dette er repoet som står for front-end biten av Teknisk Museum-prosjektet "Kunstig Jens". Her finner du svar på de viktigste tingene du trenger å kunne for å starte opp applikasjonen.

## Oppsett

1. Prosjektet bruker [Bun](https://bun.sh) for pakkebehandling og kjøring av kode. Om du ikke har installert Bun, kan det gjøres slik:

```shell
# For MacOS, Linux, og WSL
curl -fsSL https://bun.sh/install | bash

# For Windows
powershell -c "irm bun.sh/install.ps1|iex"
```

2. Deretter kan du installere avhengighetene i prosjektet ved å kjøre

```shell
bun install
```

3. Til slutt kan du starte opp det lokale utviklingsmiljøet ved å kjøre

```shell
bun run start
```

## Forskjellige miljøer

Om man ønsker å gå mot forskjellige miljøer, er det satt opp et sett med forskjellige konfigurasjoner i prosjektet. Disse finner man i mappen `/src/environments/`. Om man f.eks. ønsker å bruke konfigurasjonen "Computas", kan man gjøre det ved å legge til argumentet `--configuration` når man starter opp det lokale utviklingsmiljøet. Det vil si at man da kjører scriptet

```shell
bun run start --configuration computas
```

## Oppstår det problemer i teamet forbundet med bruk av Bun?

Ikke noe problem! Dere kan enkelt gå over til mer tradisjonelle verktøy som Yarn eller NPM. Da er det bare å gjøre følgende:

- Slett `bun.lockb` filen.
- Endre workflowene i `.github/workflows` til å ikke bruke Bun (dvs erstatt trinnet `uses: oven-sh/setup-bun@v1` samt andre kall som bruker Bun).
- Skriv inn ny pakkebehandler i feltet `cli.packageManager` i `angular.json`.
- Lag en ny lockfil med den nye pakkebehandleren ved å kjøre hhv. `npm i` eller `yarn`.
Loading

0 comments on commit 168d1a5

Please sign in to comment.