Skip to content

Commit 8779680

Browse files
committed
initial commit
0 parents  commit 8779680

15 files changed

Lines changed: 12822 additions & 0 deletions

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[*.json]
24+
indent_size = 2
25+
26+
[*.{html,js,md}]
27+
block_comment_start = /**
28+
block_comment = *
29+
block_comment_end = */

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '20'
21+
22+
- name: Install and build
23+
run: |
24+
npm ci
25+
npm run build
26+
27+
- name: Deploy
28+
uses: JamesIves/github-pages-deploy-action@v4
29+
with:
30+
folder: 'dist'
31+
branch: 'deploy'
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Test on PR branch
2+
on: pull_request
3+
4+
jobs:
5+
unit:
6+
runs-on: ubuntu-22.04
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
11+
- name: Set up Node.js
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: '20'
15+
16+
- name: Install dependencies
17+
run: npm ci
18+
19+
- name: Install playwright browsers
20+
run: npx playwright install chromium
21+
22+
- name: Run unit tests
23+
run: npm run-script test:unit
24+
visual:
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: '20'
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Install playwright browsers
39+
run: npx playwright install chromium
40+
41+
- name: Run visual test
42+
run: npm run-script test:visual
43+
44+
- name: Update screenshots
45+
if: failure()
46+
run: npm run test:update
47+
48+
- name: Upload failed screenshots as artifacts
49+
uses: actions/upload-artifact@v4
50+
if: failure()
51+
with:
52+
name: failed_screenshots
53+
path: |
54+
screenshots/*/failed/
55+
screenshots/*/baseline/

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
on: [push, workflow_dispatch]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-22.04
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
11+
- name: Set up Node.js
12+
uses: actions/setup-node@v3
13+
with:
14+
node-version: '20'
15+
16+
- name: Install dependencies
17+
run: npm ci
18+
19+
- name: Install playwright browsers
20+
run: npx playwright install chromium
21+
22+
- name: Run tests
23+
run: npm run test

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## editors
2+
/.idea
3+
/.vscode
4+
5+
## system files
6+
.DS_Store
7+
8+
## npm
9+
/node_modules/
10+
/npm-debug.log
11+
12+
## testing
13+
/coverage/
14+
15+
## temp folders
16+
/.tmp/
17+
18+
# build
19+
/.rollup.cache/
20+
/dist/*
21+
!/dist/__snapshots__/
22+
about.html
23+
24+
storybook-static
25+
custom-elements.json

0 commit comments

Comments
 (0)