Skip to content

Commit 323c865

Browse files
authored
Merge pull request danskernesdigitalebibliotek#82 from danskernesdigitalebibliotek/release/2
Release 2 - PR
2 parents 923e885 + 4b5d2bf commit 323c865

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+851
-87
lines changed

.github/workflows/a11y.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: "16"
16+
node-version-file: '.nvmrc'
1717
- run: npm ci
1818

1919
- name: Compile styles

.github/workflows/chromatic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
with:
1111
fetch-depth: 0
1212

13-
- uses: actions/setup-node@v2
13+
- uses: actions/setup-node@v3
1414
with:
15-
node-version: "16"
15+
node-version-file: '.nvmrc'
1616

1717
- run: npm ci
1818

.github/workflows/deployment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v2
11+
- uses: actions/setup-node@v3
1212
with:
13-
node-version: "16"
13+
node-version-file: '.nvmrc'
1414
- run: npm ci
1515

1616
- name: Building
@@ -41,9 +41,9 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v2
44-
- uses: actions/setup-node@v2
44+
- uses: actions/setup-node@v3
4545
with:
46-
node-version: "16"
46+
node-version-file: '.nvmrc'
4747
registry-url: "https://npm.pkg.github.com"
4848
scope: "@${{ github.repository_owner }}"
4949

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- uses: actions/checkout@v2
1414

1515
- name: Setup Node
16-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v3
1717
with:
18-
node-version: "16"
18+
node-version-file: '.nvmrc'
1919

2020
- name: Cache dependencies
2121
uses: actions/cache@v2

.github/workflows/lint.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: "16"
16+
node-version-file: '.nvmrc'
1717
- run: npm ci
1818

1919
- name: Run stylelint
@@ -29,9 +29,9 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- uses: actions/checkout@v2
32-
- uses: actions/setup-node@v2
32+
- uses: actions/setup-node@v3
3333
with:
34-
node-version: "16"
34+
node-version-file: '.nvmrc'
3535
- run: npm ci
3636

3737
- name: Run eslint
@@ -41,9 +41,9 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@v2
44-
- uses: actions/setup-node@v2
44+
- uses: actions/setup-node@v3
4545
with:
46-
node-version: "16"
46+
node-version-file: '.nvmrc'
4747

4848
- run: npm ci
4949

@@ -54,9 +54,9 @@ jobs:
5454
runs-on: ubuntu-latest
5555
steps:
5656
- uses: actions/checkout@v2
57-
- uses: actions/setup-node@v2
57+
- uses: actions/setup-node@v3
5858
with:
59-
node-version: "16"
59+
node-version-file: '.nvmrc'
6060

6161
- run: npm ci
6262

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore markdown since linter uses other rules than Prettier
2+
*.md
3+
4+
# Ignore Yaml since linter uses other rules than Prettier
5+
*.yml

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,28 @@ styles and icons.
117117
You can find the HTML output for a given story under the HTML tab inside
118118
storybook.
119119

120+
### NPM package
121+
122+
[The GitHub NPM package registry requires authentication if you are to access
123+
packages there](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token).
124+
125+
Consequently, if you want to use the design system as an NPM package or if you
126+
use a project that depends on the design system as an NPM package you must
127+
authenticate:
128+
129+
1. [Create a GitHub token with the required scopes: `repo` and `read:packages`](https://github.com/settings/tokens/new?description=npm&scopes=repo,read:packages)
130+
2. Run `npm login --registry=https://npm.pkg.github.com`
131+
3. Enter the following information:
132+
133+
```shell
134+
> Username: [Your GitHub username]
135+
> Password: [Your GitHub token]
136+
> Email: [An email address used with your GitHub account]
137+
```
138+
139+
Note that you will need to reauthenticate when your personal access token
140+
expires.
141+
120142
## Deployment
121143

122144
The project is getting rebuild on pushes to every branch and every tag. In

Taskfile.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ vars:
77
sh: git rev-list --count origin/main
88

99
# Constructing docker image name.
10-
DOCKER_IMAGE_PREFIX: "{{ .RELEASE_IMAGE_REGISTRY }}/{{ .DOCKER_IMAGE_NAMESPACE }}"
10+
DOCKER_IMAGE_PREFIX: '{{ .RELEASE_IMAGE_REGISTRY }}/{{ .DOCKER_IMAGE_NAMESPACE }}'
1111

1212
# Constructing docker image name.
1313
RELEASE_IMAGE_NAME: '{{.RELEASE_IMAGE_NAME | default "dpl-cms-source"}}'
@@ -28,7 +28,7 @@ tasks:
2828
summary: Install and run docker compose
2929
cmds:
3030
- task dev:install
31-
- docker compose up --detach
31+
- docker compose {{ .DOCKER_COMPOSE_FILES }} up --detach
3232

3333
dev:stop:
3434
summary: Stop docker compose environment
@@ -47,10 +47,14 @@ tasks:
4747
cmds:
4848
- docker compose logs node --follow
4949

50+
dev:axe:
51+
summary: Run accessibility tests
52+
cmds:
53+
- task dev:cli -- npm run storybook:axe
54+
5055
dev:reset:
5156
summary: Install development environment and clean up.
5257
cmds:
53-
- task dev:cli -- storybook:axe
5458
- task dev:down
5559
- rm -rf node_modules
5660
- task dev:up

base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
@import "./src/stories/counter/counter";
2727
@import "./src/stories/checkbox/checkbox";
2828
@import "./src/stories/availability-label/availability-label";
29+
@import "./src/stories/search-result-item/search-result-item";
30+
@import "./src/stories/icon/icon-favourite/icon-favourite";
31+
@import "./src/stories/autosuggest-text/autosuggest-text";
32+
@import "./src/stories/button-favourite/button-favourite";
33+
@import "./src/stories/autosuggest-material/autosuggest-material";
2934

3035
@import "./src/stories/list-reservation/list-reservation";
3136
@import "./src/stories/list-dashboard/list-dashboard";

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ version: '3.7'
22

33
services:
44
node:
5-
image: node:16
5+
# Remember to keep version updated with the .nvmrc file.
6+
# The .nvmrc file is used in Github Actions and for "dockerless" development.
7+
image: node:16.14.2
68
user: node
79
init: true
810
working_dir: /home/node/app

0 commit comments

Comments
 (0)