Skip to content

Commit 9658b41

Browse files
authored
Initial commit
0 parents  commit 9658b41

30 files changed

+15461
-0
lines changed

.eslintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"env": {
3+
"browser": false,
4+
"es6": true,
5+
"node": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": ["@typescript-eslint", "jest"],
9+
"extends": [
10+
"eslint:recommended",
11+
"plugin:@typescript-eslint/eslint-recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"prettier",
14+
"plugin:react/recommended",
15+
"plugin:storybook/recommended",
16+
"plugin:jsx-a11y/recommended"
17+
],
18+
"rules": {
19+
"react/jsx-uses-react": "off",
20+
"react/react-in-jsx-scope": "off"
21+
}
22+
}

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build code
2+
3+
on: push
4+
5+
jobs:
6+
build-code:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
- name: Install
12+
run: yarn
13+
- name: Build
14+
run: yarn build
15+
- name: Build SWC
16+
run: yarn build:swc
17+
- name: Build storybook
18+
run: yarn storybook:build
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: 'CodeQL'
13+
14+
on:
15+
push:
16+
branches: [main]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [main]
20+
schedule:
21+
- cron: '44 9 * * 0'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: ['javascript']
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v2
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint code
2+
3+
on: push
4+
5+
jobs:
6+
lint-code:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
- name: Install
12+
run: yarn
13+
- name: Lint
14+
run: yarn lint

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish package to npm
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
- name: Install
19+
run: yarn install --frozen-lockfile
20+
- name: Build
21+
run: yarn build
22+
- name: Release
23+
run: yarn release

.github/workflows/storybook.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Storybook
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
storybook:
9+
name: Deployment storybook on gh-pages
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
- name: Get yarn cache directory path
15+
id: yarn-cache-dir-path
16+
run: echo "::set-output name=dir::$(yarn cache dir)"
17+
- name: Restore cache
18+
uses: actions/cache@v3
19+
with:
20+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
- name: Install dependencies
25+
run: |
26+
yarn install --prefer-offline --frozen-lockfile
27+
- name: Deploy
28+
run: |
29+
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
30+
yarn storybook:deploy:action
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Test code
2+
3+
on: push
4+
5+
jobs:
6+
test-code:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
- name: Install
12+
run: yarn
13+
- name: Test
14+
run: yarn test

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Dependencies
7+
node_modules/
8+
9+
# JetBrains IDEs
10+
.idea/
11+
12+
# Optional npm cache directory
13+
.npm
14+
15+
# Optional eslint cache
16+
.eslintcache
17+
18+
# Misc
19+
.DS_Store
20+
21+
# Transpiled files
22+
build/
23+
24+
# .env you know
25+
.env
26+
27+
# .vscode
28+
.vscode/
29+
30+
# .swc
31+
.swc/
32+
33+
# storybook
34+
storybook-static/

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"overrides": [
5+
{
6+
"files": "*.{ts,tsx}",
7+
"options": {
8+
"parser": "typescript"
9+
}
10+
}
11+
]
12+
}

.releaserc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
"main",
5+
"next",
6+
"next-major",
7+
{ "name": "beta", "prerelease": true },
8+
{ "name": "alpha", "prerelease": true }
9+
],
10+
"plugins": [
11+
"@semantic-release/commit-analyzer",
12+
"@semantic-release/release-notes-generator",
13+
"@semantic-release/npm",
14+
"@semantic-release/github",
15+
"@semantic-release/git"
16+
]
17+
}

0 commit comments

Comments
 (0)