-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support contributions from outside Nav + update some README files (#3483
) Co-authored-by: Ken <[email protected]>
- Loading branch information
1 parent
0480d78
commit ef3464c
Showing
14 changed files
with
261 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
## TL;DR | ||
|
||
Vi bruker yarn for pakkeversjonering. Har du ikke yarn? `npm i -g yarn` | ||
Vi bruker yarn for pakkeversjonering. Har du ikke yarn? `corepack enable` | ||
|
||
```sh | ||
git clone [email protected]:navikt/aksel.git | ||
|
@@ -17,43 +17,51 @@ yarn storybook | |
yarn dev | ||
``` | ||
|
||
Storybook: [http://localhost:6006](http://localhost:6006) | ||
Storybook: http://localhost:6006 | ||
|
||
Nettside: [http://localhost:3000](http://localhost:3000) | ||
Nettside: http://localhost:3000 | ||
|
||
### Ikke Nav-ansatt? | ||
|
||
Nettsiden avhenger av pakker som ikke er åpent tilgjengelig. Du kan likevel bidra på andre deler av repoet ved å kjøre denne kommandoen i stedet for `yarn install`: | ||
|
||
```sh | ||
yarn workspaces focus @navikt/aksel-icons @navikt/ds-tokens @navikt/ds-css @navikt/ds-react @navikt/ds-tailwind @navikt/aksel @navikt/aksel-stylelint | ||
``` | ||
|
||
## Utviklingsmiljø | ||
|
||
Vi bruker storybook [https://storybook.js.org/](https://storybook.js.org/) for utvikling av nye komponenter. | ||
Lag `stories` for komponentene man vil teste [(hvordan skrive storybook stories)](https://storybook.js.org/docs/react/writing-stories/introduction) | ||
Vi bruker [Storybook](https://storybook.js.org/) for utvikling av nye komponenter. | ||
Lag [stories](https://storybook.js.org/docs/writing-stories) for komponentene du vil teste. | ||
|
||
## Utvikling av nye komponenter | ||
|
||
Det er ikke satt opp en template for nye komponenter, men vi følger en mal. | ||
Det er ikke satt opp noen template for nye komponenter, men vi følger en mal. | ||
|
||
```sh | ||
@navikt/pakkenavn | ||
└─ src # Komponenter | ||
├─ index.ts # Alle exports | ||
└─ pakkenavn | ||
└─ komponent | ||
├─ index.ts # Alle exports fra komponent | ||
├─ komponent.tsx # Komponentkode | ||
└─ komponent.stories.tsx # Stories | ||
``` | ||
|
||
## Dokumentasjon | ||
|
||
Dokumentasjon for komponenter finner man på [aksel.nav.no](https://aksel.nav.no/). Hvis man ønsker å skrive noe dokumentasjon selv gjør vi det via CMS et Sanity. Kode-eksempler blir skrevet lokalt i [/pages/eksempler](https://github.com/navikt/aksel/tree/main/aksel.nav.no/website/pages/eksempler) | ||
Dokumentasjon for komponenter finner man på [aksel.nav.no](https://aksel.nav.no/). Hvis man ønsker å skrive noe dokumentasjon selv gjør vi det via CMS-et Sanity. Kode-eksempler blir skrevet lokalt i [/pages/eksempler](https://github.com/navikt/aksel/tree/main/aksel.nav.no/website/pages/eksempler) | ||
|
||
## Versjonering av pakker | ||
|
||
Vi bruker `changeset` for versjonering av pakker. Se [README](https://github.com/navikt/aksel/blob/main/.changeset/README.md) for mer informasjon. | ||
|
||
## Kodekvalitet og testing | ||
|
||
Komponenter og løsninger blir testet med jest + react-testing-library. | ||
Komponenter og løsninger blir testet med vitest + react-testing-library. | ||
|
||
- Commit: Kjører prettier på endrede filer + linter | ||
- Ved PR: Kjører tester, linter og visuell regresjonstester | ||
- Ved PR: Kjører tester, linter og visuelle regresjonstester | ||
|
||
## Oppdatere Aksel.nav.no | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.