Skip to content

Commit a81b625

Browse files
authored
Merge pull request #1 from seamapi/all-the-things
Live demo
2 parents a0bbbfc + 567f7a2 commit a81b625

Some content is hidden

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

68 files changed

+21699
-2868
lines changed

Diff for: .babelrc.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"sourceType": "module",
3+
"presets": [
4+
[
5+
"@babel/preset-env",
6+
{
7+
"targets": {
8+
"chrome": 100
9+
}
10+
}
11+
],
12+
"@babel/preset-typescript",
13+
"@babel/preset-react"
14+
]
15+
}

Diff for: .devcontainer/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG VARIANT="18"
2+
3+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
4+
5+
USER node
6+
WORKDIR /home/node
7+
8+
RUN mkdir -p .config/git \
9+
&& echo ".vscode/*" >> .config/git/ignore \
10+
&& echo "*.code-workspace" >> .config/git/ignore \
11+
&& echo ".history/" >> .config/git/ignore

Diff for: .devcontainer/devcontainer.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "TypeScript",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "18"
7+
}
8+
},
9+
"extensions": [
10+
"ms-vsliveshare.vsliveshare",
11+
"dbaeumer.vscode-eslint",
12+
"EditorConfig.EditorConfig",
13+
"esbenp.prettier-vscode"
14+
],
15+
"forwardPorts": [6006, 6007, 8080],
16+
"portsAttributes": {
17+
"6006": { "label": "Storybook" },
18+
"6007": { "label": "Docs" },
19+
"8080": { "label": "Example" }
20+
},
21+
"postCreateCommand": "npm install",
22+
"remoteUser": "node"
23+
}

Diff for: .eslintrc.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"standard-with-typescript",
5+
"standard-jsx",
6+
"standard-react",
7+
"plugin:react/jsx-runtime",
8+
"plugin:storybook/recommended",
9+
"prettier"
10+
],
11+
"plugins": ["simple-import-sort", "unused-imports"],
12+
"parserOptions": {
13+
"project": "./tsconfig.json"
14+
},
15+
"rules": {
16+
"no-console": "warn",
17+
"@typescript-eslint/consistent-type-imports": [
18+
"error",
19+
{
20+
"fixStyle": "inline-type-imports"
21+
}
22+
],
23+
"@typescript-eslint/no-unused-vars": "off",
24+
"unused-imports/no-unused-imports": "error",
25+
"unused-imports/no-unused-vars": [
26+
"error",
27+
{
28+
"vars": "all",
29+
"varsIgnorePattern": "^_",
30+
"args": "after-used",
31+
"argsIgnorePattern": "^_",
32+
"ignoreRestSiblings": true
33+
}
34+
],
35+
"import/extensions": ["error", "ignorePackages"],
36+
"import/no-duplicates": ["error", { "prefer-inline": true }],
37+
"simple-import-sort/imports": [
38+
"error",
39+
{
40+
"groups": [
41+
["^\\u0000"],
42+
["^node:"],
43+
["^@?\\w"],
44+
["index.js"],
45+
["^fixtures/", "^lib/"],
46+
["^"],
47+
["^\\."]
48+
]
49+
}
50+
],
51+
"simple-import-sort/exports": "error"
52+
}
53+
}

Diff for: .github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @razor-x
2+
* @azat-co

Diff for: .github/actions/setup/action.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Setup
3+
description: Setup Node.js and install dependencies.
4+
5+
inputs:
6+
node_version:
7+
description: The Node.js version.
8+
required: false
9+
default: '18'
10+
registry_url:
11+
description: The Node.js package registry URL.
12+
required: false
13+
default: https://registry.npmjs.org
14+
install_dependencies:
15+
description: Install dependencies.
16+
required: false
17+
default: 'true'
18+
19+
runs:
20+
using: composite
21+
steps:
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v3
24+
if: inputs.install_dependencies == 'true'
25+
with:
26+
cache: npm
27+
node-version: ${{ inputs.node_version }}
28+
registry-url: ${{ inputs.registry_url }}
29+
- name: Setup Node.js without cache
30+
uses: actions/setup-node@v3
31+
if: inputs.install_dependencies == 'false'
32+
with:
33+
node-version: ${{ inputs.node_version }}
34+
registry-url: ${{ inputs.registry_url }}
35+
- name: Install dependencies
36+
if: inputs.install_dependencies == 'true'
37+
shell: bash
38+
run: npm ci

Diff for: .github/stale.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
daysUntilStale: 21
3+
daysUntilClose: 7
4+
exemptLabels:
5+
- pinned
6+
- security
7+
staleLabel: wontfix
8+
markComment: >
9+
This issue has been automatically marked as stale because it has not had
10+
recent activity. It will be closed if no further activity occurs.
11+
closeComment: false
12+
pulls:
13+
daysUntilStale: 3
14+
daysUntilClose: 1
15+
staleLabel: stale
16+
markComment: >
17+
This pull request has been automatically marked as stale because it has not had
18+
recent activity. It will be closed if no further activity occurs.

Diff for: .github/workflows/_build.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: _build
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
node_version:
8+
description: The Node.js version.
9+
type: string
10+
required: false
11+
default: '18'
12+
outputs:
13+
artifact_name:
14+
description: The artifact name.
15+
value: build-${{ github.sha }}
16+
17+
jobs:
18+
build:
19+
name: Package
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 30
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v3
25+
- name: Setup
26+
uses: ./.github/actions/setup
27+
with:
28+
node_version: ${{ inputs.node_version }}
29+
- name: Build
30+
run: npm run build
31+
- name: Package
32+
run: npm pack
33+
- name: Upload artifact
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: build-${{ github.sha }}
37+
if-no-files-found: error
38+
path: '*.tgz'

Diff for: .github/workflows/_publish.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: _publish
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
artifact_name:
8+
description: The artifact name.
9+
type: string
10+
required: true
11+
registry_host:
12+
description: The package registry host.
13+
type: string
14+
required: true
15+
secrets:
16+
registry_token:
17+
description: The package registry token.
18+
required: true
19+
20+
jobs:
21+
publish:
22+
name: Publish package
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 30
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Setup
29+
uses: ./.github/actions/setup
30+
with:
31+
install_dependencies: 'false'
32+
- name: Download artifact
33+
uses: actions/download-artifact@v3
34+
with:
35+
name: ${{ inputs.artifact_name }}
36+
path: .
37+
- name: Get meta
38+
id: meta
39+
run: echo "tgz=$(ls *.tgz | head -n1)" >> $GITHUB_OUTPUT
40+
- name: Publish
41+
uses: rxfork/npm-publish@v1
42+
with:
43+
access: public
44+
target: ${{ steps.meta.outputs.tgz }}
45+
token: ${{ secrets.registry_token }}
46+
registry: ${{ inputs.registry_host }}

0 commit comments

Comments
 (0)