Skip to content

Commit

Permalink
🧑‍💻 Yarn berry (#140)
Browse files Browse the repository at this point in the history
* 🧑‍💻 set yarn version berry og riktig yarnrc fil

Co-authored-by: Øivind Stensrud <[email protected]>
Co-authored-by: Thomas Rognes <[email protected]>

* 📝 Oppdater readme med yarn berry

---------

Co-authored-by: Øivind Stensrud <[email protected]>
Co-authored-by: Thomas Rognes <[email protected]>
  • Loading branch information
3 people authored Feb 27, 2024
1 parent e8f3c8d commit c374542
Show file tree
Hide file tree
Showing 7 changed files with 9,862 additions and 6,950 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
IMAGE_BASE: europe-north1-docker.pkg.dev/${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}/aap/${{ github.event.repository.name }}
jobs:
buildDev:
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@node-20
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@frontend-next-build-yarnberry
permissions:
contents: read
id-token: write
Expand All @@ -22,7 +22,7 @@ jobs:
playwright: false
cdn: true
buildProd:
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@node-20
uses: navikt/aap-workflows/.github/workflows/frontend-next-build.yml@frontend-next-build-yarnberry
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
manifest: .nais/nais.yaml,.nais/prod-alerts.yaml
imageSuffix: -prod-gcp
vars: .nais/prod.yaml
deployAppToProd:
deployAlertsProd:
name: Deploy alerts to prod
needs: buildProd
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# local env file
tsconfig.tsbuildinfo
.env.local

#yarn berry
.yarn/install-state.gz

# dependencies
.yarn/
/node_modules
/.pnp
.pnp.js
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

npmScopes:
navikt:
npmAlwaysAuth: true
npmAuthToken: "${NPM_AUTH_TOKEN:-}"
npmRegistryServer: "https://npm.pkg.github.com"
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ Kom i gang:

https://aap-team-innbygger.intern.nav.no/docs/Komme%20i%20gang/komme-i-gang-med-utvikling/

## Bygge app lokalt

### Github package registry

Vi bruker Github sitt package registry for npm pakker, siden flere av Nav sine pakker kun blir publisert her.

For å kunne kjøre `yarn install` lokalt må du logge inn mot Github package registry. Legg til følgende i .bashrc eller .zshrc lokalt på din maskin:
I .bashrc eller .zshrc:

`export NPM_AUTH_TOKEN=github_pat`

Hvor github_pat er din personal access token laget på github(settings -> developer settings). Husk read:packages rettighet og enable sso når du oppdaterer/lager PAT.

---

# Henvendelser

---
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit c374542

Please sign in to comment.