Skip to content

Commit 37980bc

Browse files
authored
chore: add ci action (#96)
* chore: add ci action * chore: update README.md * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update * chore: update
1 parent 3945164 commit 37980bc

File tree

21 files changed

+1711
-588
lines changed

21 files changed

+1711
-588
lines changed

.github/workflows/ci.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, beta]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
ci:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
command:
18+
[
19+
'yarn workspace overlay-kit run test',
20+
'yarn workspace overlay-kit run test:attw',
21+
'yarn workspace overlay-kit run test:publint',
22+
'yarn lint',
23+
'yarn workspace @overlay-kit/framer-motion-react-16 run build',
24+
'yarn workspace @overlay-kit/framer-motion-react-17 run build',
25+
'yarn workspace @overlay-kit/framer-motion-react-18 run build',
26+
]
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version-file: '.nvmrc'
34+
cache: 'yarn'
35+
36+
- name: Install Dependencies
37+
run: yarn install
38+
39+
- name: Build Package
40+
run: yarn workspace overlay-kit run build
41+
42+
- name: Run command
43+
run: ${{ matrix.command }}
44+
- if: matrix.command == 'yarn workspace overlay-kit run test'
45+
uses: codecov/codecov-action@v4
46+
env:
47+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

README-ko_kr.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](./docs/public/og.png)
22

3-
# overlay-kit · [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE)
3+
# overlay-kit · [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/overlay-kit/graph/badge.svg?token=JBEAQTL7XK)](https://codecov.io/gh/toss/overlay-kit)
44

55
[English](https://github.com/toss/overlay-kit/blob/main/README.md) | 한국어
66

@@ -9,7 +9,7 @@ overlay-kit은 React에서 오버레이를 선언적으로 관리하기 위한
99
```tsx
1010
import { overlay } from 'overlay-kit';
1111

12-
<Button
12+
<Button
1313
onClick={() => {
1414
overlay.open(({ isOpen, close }) => {
1515
return <Dialog open={isOpen} onClose={close} />;
@@ -27,7 +27,6 @@ overlay-kit은 다음과 같은 기능을 제공해요.
2727
- **Promise 통합**: overlay-kit과 Promise를 함께 사용하면 오버레이로부터 결괏값을 쉽게 가져올 수 있어요.
2828
- **견고한 내장 타입**: overlay-kit은 모든 함수에 대해서 견고한 타입을 제공해요. 타입 안정성이 높고, 개발자 경험도 좋죠.
2929

30-
3130
## License
3231

3332
MIT © Viva Republica, Inc. 자세한 내용은 [LICENSE](https://github.com/toss/overlay-kit/blob/main/LICENSE)를 참고하세요.

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](./docs/public/og.png)
22

3-
# overlay-kit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE)
3+
# overlay-kit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/overlay-kit/graph/badge.svg?token=JBEAQTL7XK)](https://codecov.io/gh/toss/overlay-kit)
44

55
English | [한국어](https://github.com/toss/overlay-kit/blob/main/README-ko_kr.md)
66

@@ -9,7 +9,7 @@ overlay-kit is a library that lets you manage overlays in a simple and declarati
99
```tsx
1010
import { overlay } from 'overlay-kit';
1111

12-
<Button
12+
<Button
1313
onClick={() => {
1414
overlay.open(({ isOpen, close }) => {
1515
return <Dialog open={isOpen} onClose={close} />;
@@ -27,7 +27,6 @@ Here are the features overlay-kit provides:
2727
- **Promise Integration**: overlay-kit is easy to use with promises when getting results from overlays.
2828
- **Robust Built-in Types**: overlay-kit offers robust types for all functions, ensuring type safety and enhancing the developer experience.
2929

30-
3130
## License
3231

3332
MIT © Viva Republica, Inc. See [LICENSE](https://github.com/toss/overlay-kit/blob/main/LICENSE) for details.

codecov.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
coverage:
2+
status:
3+
patch: off
4+
project:
5+
default:
6+
target: 100%
7+
threshold: 30%
8+
9+
comment:
10+
layout: "header, reach, diff, flags, components"
11+
behavior: default
12+
require_changes: false
13+
require_base: false
14+
require_head: true
15+
hide_project_coverage: false
16+
17+
ignore:
18+
- "**/*.test-d.*"
19+
- "**/test-utils/*"
20+
21+
component_management:
22+
individual_components:
23+
- component_id: overlay-kit
24+
name: "overlay-kit"
25+
paths:
26+
- packages/**

examples/react-16/framer-motion/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"dependencies": {
1414
"framer-motion": "^6",
15-
"overlay-kit": "npm:overlay-kit@1.4.0-canary.2407260853",
15+
"overlay-kit": "workspace:*",
1616
"react": "^16.8",
1717
"react-dom": "^16.8"
1818
},
1919
"devDependencies": {
2020
"@types/react": "^16.8",
2121
"@types/react-dom": "^16.8",
22-
"@vitejs/plugin-react": "^4.3.0",
22+
"@vitejs/plugin-react": "^4.3.4",
2323
"typescript": "^5.4.5",
24-
"vite": "^5.2.13"
24+
"vite": "^6.0.3"
2525
}
2626
}

examples/react-16/framer-motion/src/demo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { overlay } from 'overlay-kit';
22
import { useState } from 'react';
3-
import { Modal } from './components/modal';
3+
import { Modal } from './components/modal.tsx';
44

55
export function Demo() {
66
return (

examples/react-16/framer-motion/src/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OverlayProvider } from 'overlay-kit';
22
import React from 'react';
33
import ReactDOM from 'react-dom';
4-
import { Demo } from './demo';
4+
import { Demo } from './demo.tsx';
55

66
ReactDOM.render(
77
<React.StrictMode>
+18-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ESNext", "DOM"],
4-
"target": "es2016",
5-
"module": "commonjs",
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"strict": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
97
"skipLibCheck": true,
10-
"jsx": "preserve"
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"isolatedModules": true,
13+
"moduleDetection": "force",
14+
"noEmit": true,
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1122
},
1223
"include": ["src"]
1324
}

examples/react-17/framer-motion/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"dependencies": {
1414
"framer-motion": "^6",
15-
"overlay-kit": "npm:overlay-kit@1.4.0-canary.2407260853",
15+
"overlay-kit": "workspace:*",
1616
"react": "^17",
1717
"react-dom": "^17"
1818
},
1919
"devDependencies": {
2020
"@types/react": "^17",
2121
"@types/react-dom": "^17",
22-
"@vitejs/plugin-react": "^4.3.0",
22+
"@vitejs/plugin-react": "^4.3.4",
2323
"typescript": "^5.4.5",
24-
"vite": "^5.2.13"
24+
"vite": "^6.0.3"
2525
}
2626
}

examples/react-17/framer-motion/src/demo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { overlay } from 'overlay-kit';
22
import { useState } from 'react';
3-
import { Modal } from './components/modal';
3+
import { Modal } from './components/modal.tsx';
44

55
export function Demo() {
66
return (

examples/react-17/framer-motion/src/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OverlayProvider } from 'overlay-kit';
22
import React from 'react';
33
import ReactDOM from 'react-dom';
4-
import { Demo } from './demo';
4+
import { Demo } from './demo.tsx';
55

66
ReactDOM.render(
77
<React.StrictMode>
+18-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ESNext", "DOM"],
4-
"target": "es2016",
5-
"module": "commonjs",
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"strict": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
97
"skipLibCheck": true,
10-
"jsx": "preserve"
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"isolatedModules": true,
13+
"moduleDetection": "force",
14+
"noEmit": true,
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1122
},
1223
"include": ["src"]
1324
}

examples/react-18/framer-motion/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
},
1313
"dependencies": {
1414
"framer-motion": "^11.2.10",
15-
"overlay-kit": "workspace:^",
15+
"overlay-kit": "workspace:*",
1616
"react": "^18.2.0",
1717
"react-dom": "^18.2.0"
1818
},
1919
"devDependencies": {
2020
"@types/react": "^18.2.0",
2121
"@types/react-dom": "^18.2.0",
22-
"@vitejs/plugin-react": "^4.3.0",
22+
"@vitejs/plugin-react": "^4.3.4",
2323
"typescript": "^5.4.5",
24-
"vite": "^5.2.13"
24+
"vite": "^6.0.3"
2525
}
2626
}

examples/react-18/framer-motion/src/demo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { overlay } from 'overlay-kit';
22
import { useState } from 'react';
3-
import { Modal } from './components/modal';
3+
import { Modal } from './components/modal.tsx';
44

55
export function Demo() {
66
return (

examples/react-18/framer-motion/src/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { OverlayProvider } from 'overlay-kit';
22
import React from 'react';
33
import ReactDOM from 'react-dom/client';
4-
import { Demo } from './demo';
4+
import { Demo } from './demo.tsx';
55

66
ReactDOM.createRoot(document.getElementById('root')!).render(
77
<React.StrictMode>
+18-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ESNext", "DOM"],
4-
"target": "es2016",
5-
"module": "commonjs",
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"strict": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
6+
"module": "ESNext",
97
"skipLibCheck": true,
10-
"jsx": "preserve"
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"isolatedModules": true,
13+
"moduleDetection": "force",
14+
"noEmit": true,
15+
"jsx": "react-jsx",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
1122
},
1223
"include": ["src"]
1324
}

packages/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
dist
1+
dist
2+
coverage

packages/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](../docs/public/og.png)
22

3-
# overlay-kit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE)
3+
# overlay-kit &middot; [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/toss/overlay-kit/blob/main/LICENSE) [![codecov](https://codecov.io/gh/toss/overlay-kit/graph/badge.svg?token=JBEAQTL7XK)](https://codecov.io/gh/toss/overlay-kit)
44

55
English | [한국어](https://github.com/toss/overlay-kit/blob/main/README-ko_kr.md)
66

@@ -13,16 +13,16 @@ import { overlay } from 'overlay-kit';
1313
onClick={() => {
1414
overlay.open(({ isOpen, close }) => {
1515
return <Dialog open={isOpen} onClose={close} />;
16-
});
16+
})
1717
}}
1818
>
1919
Open
20-
</Button>;
20+
</Button>
2121
```
2222

2323
Here are the features overlay-kit provides:
2424

25-
- **Hassle-free**: overlay-kit makes overlay management straightforward with a simple function call: just call `overlay.open(...)`. See [the overlay problem](https://overlay-kit.slash.page/motivation.html) for details.
25+
- **Hassle-free**: overlay-kit makes overlay management straightforward with a simple function call: just call `overlay.open(...)`. See [the code comparison](https://overlay-kit.slash.page/code-comparison.html) for details.
2626
- **Maximum Compatibility**: overlay-kit is compatible with the majority of overlay types. From Material UI to custom component libraries, overlay-kit can handle almost all types of overlays.
2727
- **Promise Integration**: overlay-kit is easy to use with promises when getting results from overlays.
2828
- **Robust Built-in Types**: overlay-kit offers robust types for all functions, ensuring type safety and enhancing the developer experience.

0 commit comments

Comments
 (0)