-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: 타입적으로 es-hangul의 강점을 보여줄 수 있는 타입 지원 페이지를 만듭니다. (#288)
* type support table * video 추가 * 상수를 컴포넌트 내부 변수로 스코프 이동 * introduction에 타입 지원 링크 추가 * en docs에도 타입 지원 문서 링크를 추가합니다 * 표에 적힌 '기능'을 '라이브러리'로 변경합니다 * video controller 제거 * table만 스크롤되게 변경
- Loading branch information
Showing
9 changed files
with
157 additions
and
15 deletions.
There are no files selected for viewing
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
type Locale = 'ko' | 'en'; | ||
|
||
interface TypeSupportTableProps { | ||
locale: Locale; | ||
} | ||
|
||
export default function TypeSupportTable({ locale }: TypeSupportTableProps) { | ||
const isKorean = locale === 'ko'; | ||
const fully = isKorean ? '100% 지원' : '100% Supported'; | ||
const partial = isKorean ? '일부 지원' : 'Partially Supported'; | ||
const unsupported = isKorean ? '미지원' : 'Unsupported'; | ||
|
||
return ( | ||
<div> | ||
<div className="overflow-x-auto"> | ||
<table className="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400"> | ||
<caption className="caption-top text-sm"> | ||
{isKorean | ||
? 'es-hangul, josa, hangul-js의 타입 시스템 비교' | ||
: 'Comparison of the type systems of es-hangul, josa, and hangul-js'} | ||
</caption> | ||
|
||
<thead className="text-xs text-gray-700 bg-gray-50 dark:bg-gray-700 dark:text-gray-400"> | ||
<tr> | ||
<th scope="col" className="px-6 py-3"> | ||
{isKorean ? '라이브러리' : 'Library'} | ||
</th> | ||
<th scope="col" className="px-6 py-3"> | ||
es-hangul | ||
</th> | ||
<th scope="col" className="px-6 py-3"> | ||
josa | ||
</th> | ||
<th scope="col" className="px-6 py-3"> | ||
hangul-js | ||
</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<tr className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? '개발 언어' : 'Language'} | ||
</th> | ||
<td className="px-6 py-4">TypeScript</td> | ||
<td className="px-6 py-4">JavaScript</td> | ||
<td className="px-6 py-4">JavaScript</td> | ||
</tr> | ||
<tr className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? 'TypeScript 지원 여부' : 'TypeScript support status'} | ||
</th> | ||
<td className="px-6 py-4">✅ ({fully})</td> | ||
<td className="px-6 py-4"> | ||
⚠️ ( | ||
<a className="text-gray-400" href="https://www.npmjs.com/package/@types/josa" target="_blank"> | ||
{isKorean ? '서드파티 제공' : 'Supported by third-party'} | ||
</a> | ||
) | ||
</td> | ||
<td className="px-6 py-4">⚠️ ({partial})</td> | ||
</tr> | ||
|
||
<tr className="bg-white dark:bg-gray-800"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? '강력한 타입 시스템 제공' : 'Provide a strong type system'} | ||
</th> | ||
<td className="px-6 py-4">✅ ({fully})</td> | ||
<td className="px-6 py-4">⚠️ ({partial})</td> | ||
<td className="px-6 py-4">⚠️ ({partial})</td> | ||
</tr> | ||
|
||
<tr className="bg-white dark:bg-gray-800"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? '명확한 입력/출력 타입 제공' : 'Offer clear input/output types'} | ||
</th> | ||
<td className="px-6 py-4">✅ ({fully})</td> | ||
<td className="px-6 py-4">⚠️ ({partial})</td> | ||
<td className="px-6 py-4">❌ ({unsupported})</td> | ||
</tr> | ||
|
||
<tr className="bg-white dark:bg-gray-800"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? '주기적인 타입 업데이트' : 'Regular type updates'} | ||
</th> | ||
<td className="px-6 py-4">✅ ({fully})</td> | ||
<td className="px-6 py-4">❌ ({unsupported})</td> | ||
<td className="px-6 py-4">❌ ({unsupported})</td> | ||
</tr> | ||
|
||
<tr className="bg-white dark:bg-gray-800"> | ||
<th scope="row" className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white"> | ||
{isKorean ? 'IDE 자동 완성 지원' : 'Support IDE auto-completion'} | ||
</th> | ||
<td className="px-6 py-4">✅ ({fully})</td> | ||
<td className="px-6 py-4">⚠️ ({partial})</td> | ||
<td className="px-6 py-4">❌ ({unsupported})</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<figure className="mt-12"> | ||
<figcaption className="mt-2 text-sm text-center text-gray-500"> | ||
{isKorean ? 'es-hangul의 강력한 타입 시스템' : 'The powerful type system of es-hangul'} | ||
</figcaption> | ||
|
||
<video className="rounded-lg" width="100%" autoPlay muted preload="metadata" loop> | ||
<source src="/videos/type_support.mp4" type="video/mp4"></source> | ||
</video> | ||
</figure> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: type support | ||
--- | ||
|
||
import TypeSupportTable from './type-support-table.tsx'; | ||
|
||
# 💪 Powerful Type Support | ||
|
||
Existing libraries that handled Hangul lacked type support, preventing you from fully enjoying the benefits of type safety. `es-hangul` is written in TypeScript, providing a powerful type system.<br /> | ||
This enhances code safety and maintainability while preventing errors that may occur during the development process. Additionally, using `es-hangul` clearly defines function input and output types, improving code readability and boosting development efficiency through IDE auto-completion features.<br /> | ||
Choose `es-hangul` for stable and efficient Hangul processing! | ||
|
||
<br /> | ||
<br /> | ||
|
||
<TypeSupportTable locale="en" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: type support | ||
--- | ||
|
||
import TypeSupportTable from './type-support-table.tsx'; | ||
|
||
# 💪 강력한 타입 지원 | ||
|
||
기존에 한글을 다루던 라이브러리들은 타입 지원이 부족하여 타입 안전성에서 오는 이점을 완벽히 누릴 수 없었습니다. `es-hangul`은 **TypeScript**로 작성되어 강력한 타입 시스템을 제공합니다.<br /> | ||
이는 코드의 안전성과 유지보수성을 향상시키며, 개발 과정에서 발생할 수 있는 오류를 사전에 방지합니다. 또한 `es-hangul`을 사용하면 함수의 입력과 출력 타입이 명확하게 정의되어 코드의 가독성이 높아지고, IDE의 자동 완성 기능을 통해 개발 효율이 향상됩니다.<br /> | ||
안정적이고 효율적인 한글 처리를 위해 `es-hangul`을 선택하세요! | ||
|
||
<br /> | ||
<br /> | ||
|
||
<TypeSupportTable locale="ko" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters