@@ -17,7 +16,8 @@ function HomepageHeader() {
+ to="/docs/intro"
+ >
Docusaurus Tutorial - 5min ⏱️
@@ -27,11 +27,12 @@ function HomepageHeader() {
}
export default function Home(): JSX.Element {
- const {siteConfig} = useDocusaurusContext();
+ const { siteConfig } = useDocusaurusContext();
return (
+ description="Description will go into a meta tag in "
+ >
diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json
index 99188299..81058c0c 100644
--- a/apps/docs/tsconfig.json
+++ b/apps/docs/tsconfig.json
@@ -2,6 +2,7 @@
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
- "baseUrl": "."
+ "baseUrl": ".",
+ "jsx": "preserve",
},
}
diff --git a/packages/core/.eslintrc.js b/packages/core/.eslintrc.js
index a72d4c1c..70630e78 100644
--- a/packages/core/.eslintrc.js
+++ b/packages/core/.eslintrc.js
@@ -11,6 +11,7 @@ module.exports = {
'dist/',
'coverage/',
],
+ plugins: ['eslint-plugin-tsdoc'],
extends: ['@nft-team/eslint-config'],
overrides: [
{
@@ -32,5 +33,6 @@ module.exports = {
'import/export': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
+ 'tsdoc/syntax': 'warn',
},
};
diff --git a/packages/core/package.json b/packages/core/package.json
index 95d61dd5..b8697cb1 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -31,6 +31,7 @@
"@types/jest": "^29.5.2",
"@types/jest-plugin-context": "^2.9.5",
"eslint": "^8.44.0",
+ "eslint-plugin-tsdoc": "^0.2.17",
"given2": "^2.1.7",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts
index 2345bdb1..f3e4cc79 100644
--- a/packages/core/src/utils.ts
+++ b/packages/core/src/utils.ts
@@ -1,3 +1,16 @@
+/**
+ * @description `null`이나 `undefined`값이 존재하는 경우 빈문자열로 대체하거나 새로운 문자열로 대체합니다. (오로지 `string` 타입으로 반환)
+ *
+ * ```ts
+ * const value = undefined;
+ * const result = removeNullable(value, 'newValue');
+ * ```
+ * @example
+ * console.log(result); // 'newValue';
+ * @param value - 첫 번째 인자 `string` | `null` | `undefined`
+ * @param replacementValue - 두 번째 인자에 값이 존재하는 경우 첫 번째 인자가 `null` 또는 `undefined`인 경우 두번째 인자로 문자열 대체
+ * @returns
+ */
export const removeNullable = (value?: string | null, replacementValue?: string): string => {
if (value) {
return value;
diff --git a/packages/core/typedoc.json b/packages/core/typedoc.json
new file mode 100644
index 00000000..d07bd2a3
--- /dev/null
+++ b/packages/core/typedoc.json
@@ -0,0 +1,5 @@
+{
+ "extends": ["../../typedoc.base.json"],
+ "entryPoints": ["src/index.ts"],
+ "out": "./docs"
+}
diff --git a/packages/eslint/index.js b/packages/eslint/index.js
index 01061a85..2df1b4c4 100644
--- a/packages/eslint/index.js
+++ b/packages/eslint/index.js
@@ -29,9 +29,6 @@ module.exports = {
},
ecmaVersion: 12,
sourceType: 'module',
- babelOptions: {
- presets: [require.resolve('next/babel')],
- },
},
overrides: [
{
diff --git a/packages/react/typedoc.json b/packages/react/typedoc.json
new file mode 100644
index 00000000..d07bd2a3
--- /dev/null
+++ b/packages/react/typedoc.json
@@ -0,0 +1,5 @@
+{
+ "extends": ["../../typedoc.base.json"],
+ "entryPoints": ["src/index.ts"],
+ "out": "./docs"
+}
diff --git a/typedoc.base.json b/typedoc.base.json
new file mode 100644
index 00000000..daa58cb2
--- /dev/null
+++ b/typedoc.base.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://typedoc.org/schema.json",
+ "includeVersion": true
+}
diff --git a/typedoc.json b/typedoc.json
new file mode 100644
index 00000000..b4e0342d
--- /dev/null
+++ b/typedoc.json
@@ -0,0 +1,6 @@
+{
+ "entryPoints": ["packages/*"],
+ "name": "@nft-team/frontend-libraries",
+ "entryPointStrategy": "packages",
+ "includeVersion": true
+}
diff --git a/yarn.lock b/yarn.lock
index 2297ebc4..6bf91504 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3227,6 +3227,25 @@ __metadata:
languageName: node
linkType: hard
+"@microsoft/tsdoc-config@npm:0.16.2":
+ version: 0.16.2
+ resolution: "@microsoft/tsdoc-config@npm:0.16.2"
+ dependencies:
+ "@microsoft/tsdoc": 0.14.2
+ ajv: ~6.12.6
+ jju: ~1.4.0
+ resolve: ~1.19.0
+ checksum: 12b0d703154076bcaac75ca42e804e4fc292672396441e54346d7eadd0d6b57f90980eda2b1bab89b224af86da34a2389f9054002e282011e795ca5919a4386f
+ languageName: node
+ linkType: hard
+
+"@microsoft/tsdoc@npm:0.14.2":
+ version: 0.14.2
+ resolution: "@microsoft/tsdoc@npm:0.14.2"
+ checksum: b167c89e916ba73ee20b9c9d5dba6aa3a0de25ed3d50050e8a344dca7cd43cb2e1059bd515c820369b6e708901dd3fda476a42bc643ca74a35671ce77f724a3a
+ languageName: node
+ linkType: hard
+
"@nft-team/core@workspace:packages/core":
version: 0.0.0-use.local
resolution: "@nft-team/core@workspace:packages/core"
@@ -3238,6 +3257,7 @@ __metadata:
"@types/jest": ^29.5.2
"@types/jest-plugin-context": ^2.9.5
eslint: ^8.44.0
+ eslint-plugin-tsdoc: ^0.2.17
given2: ^2.1.7
jest: ^29.5.0
jest-environment-jsdom: ^29.5.0
@@ -4877,7 +4897,7 @@ __metadata:
languageName: node
linkType: hard
-"ajv@npm:^6.10.0, ajv@npm:^6.12.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5":
+"ajv@npm:^6.10.0, ajv@npm:^6.12.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5, ajv@npm:~6.12.6":
version: 6.12.6
resolution: "ajv@npm:6.12.6"
dependencies:
@@ -4982,6 +5002,13 @@ __metadata:
languageName: node
linkType: hard
+"ansi-sequence-parser@npm:^1.1.0":
+ version: 1.1.0
+ resolution: "ansi-sequence-parser@npm:1.1.0"
+ checksum: 75f4d3a4c555655a698aec05b5763cbddcd16ccccdbfd178fb0aa471ab74fdf98e031b875ef26e64be6a95cf970c89238744b26de6e34af97f316d5186b1df53
+ languageName: node
+ linkType: hard
+
"ansi-styles@npm:^3.2.1":
version: 3.2.1
resolution: "ansi-styles@npm:3.2.1"
@@ -7196,9 +7223,12 @@ __metadata:
"@mdx-js/react": ^1.6.22
"@tsconfig/docusaurus": ^1.0.5
clsx: ^1.2.1
+ docusaurus-plugin-typedoc: ^0.19.2
prism-react-renderer: ^1.3.5
react: ^17.0.2
react-dom: ^17.0.2
+ typedoc: ^0.24.8
+ typedoc-plugin-markdown: ^3.15.3
typescript: ^4.7.4
languageName: unknown
linkType: soft
@@ -7221,6 +7251,16 @@ __metadata:
languageName: node
linkType: hard
+"docusaurus-plugin-typedoc@npm:^0.19.2":
+ version: 0.19.2
+ resolution: "docusaurus-plugin-typedoc@npm:0.19.2"
+ peerDependencies:
+ typedoc: ">=0.24.0"
+ typedoc-plugin-markdown: ">=3.15.0"
+ checksum: 347c1b6b509e14dabbb8b4d1224682ea2281995a60b4cf48e456dbbdbcecb4b73cf4fe3e031f1e01ae72dfb3bec935c6eaac7e4ddf3f63587fad2ac8ea028cec
+ languageName: node
+ linkType: hard
+
"dom-accessibility-api@npm:^0.5.6, dom-accessibility-api@npm:^0.5.9":
version: 0.5.16
resolution: "dom-accessibility-api@npm:0.5.16"
@@ -7920,6 +7960,16 @@ __metadata:
languageName: node
linkType: hard
+"eslint-plugin-tsdoc@npm:^0.2.17":
+ version: 0.2.17
+ resolution: "eslint-plugin-tsdoc@npm:0.2.17"
+ dependencies:
+ "@microsoft/tsdoc": 0.14.2
+ "@microsoft/tsdoc-config": 0.16.2
+ checksum: d143a5f1c5967812d75f246ae2776cb030f6e7966b981406c9df9352a9ab02b035f294cedb30054eac2c4a217ee4ab2ed9fb76292bdccda9438e54d2d7b0146e
+ languageName: node
+ linkType: hard
+
"eslint-plugin-unused-imports@npm:^2.0.0":
version: 2.0.0
resolution: "eslint-plugin-unused-imports@npm:2.0.0"
@@ -9082,7 +9132,7 @@ __metadata:
languageName: node
linkType: hard
-"handlebars@npm:^4.4.3":
+"handlebars@npm:^4.4.3, handlebars@npm:^4.7.7":
version: 4.7.7
resolution: "handlebars@npm:4.7.7"
dependencies:
@@ -9914,7 +9964,7 @@ __metadata:
languageName: node
linkType: hard
-"is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.9.0":
+"is-core-module@npm:^2.1.0, is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.9.0":
version: 2.12.1
resolution: "is-core-module@npm:2.12.1"
dependencies:
@@ -10926,6 +10976,13 @@ __metadata:
languageName: node
linkType: hard
+"jju@npm:~1.4.0":
+ version: 1.4.0
+ resolution: "jju@npm:1.4.0"
+ checksum: 3790481bd2b7827dd6336e6e3dc2dcc6d425679ba7ebde7b679f61dceb4457ea0cda330972494de608571f4973c6dfb5f70fab6f3c5037dbab19ac449a60424f
+ languageName: node
+ linkType: hard
+
"joi@npm:^17.6.0":
version: 17.9.2
resolution: "joi@npm:17.9.2"
@@ -11480,6 +11537,13 @@ __metadata:
languageName: node
linkType: hard
+"lunr@npm:^2.3.9":
+ version: 2.3.9
+ resolution: "lunr@npm:2.3.9"
+ checksum: 176719e24fcce7d3cf1baccce9dd5633cd8bdc1f41ebe6a180112e5ee99d80373fe2454f5d4624d437e5a8319698ca6837b9950566e15d2cae5f2a543a3db4b8
+ languageName: node
+ linkType: hard
+
"lz-string@npm:^1.5.0":
version: 1.5.0
resolution: "lz-string@npm:1.5.0"
@@ -11558,6 +11622,15 @@ __metadata:
languageName: node
linkType: hard
+"marked@npm:^4.3.0":
+ version: 4.3.0
+ resolution: "marked@npm:4.3.0"
+ bin:
+ marked: bin/marked.js
+ checksum: 0db6817893952c3ec710eb9ceafb8468bf5ae38cb0f92b7b083baa13d70b19774674be04db5b817681fa7c5c6a088f61300815e4dd75a59696f4716ad69f6260
+ languageName: node
+ linkType: hard
+
"mdast-squeeze-paragraphs@npm:^4.0.0":
version: 4.0.0
resolution: "mdast-squeeze-paragraphs@npm:4.0.0"
@@ -12729,7 +12802,7 @@ __metadata:
languageName: node
linkType: hard
-"path-parse@npm:^1.0.7":
+"path-parse@npm:^1.0.6, path-parse@npm:^1.0.7":
version: 1.0.7
resolution: "path-parse@npm:1.0.7"
checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a
@@ -14253,6 +14326,16 @@ __metadata:
languageName: node
linkType: hard
+"resolve@npm:~1.19.0":
+ version: 1.19.0
+ resolution: "resolve@npm:1.19.0"
+ dependencies:
+ is-core-module: ^2.1.0
+ path-parse: ^1.0.6
+ checksum: a05b356e47b85ad3613d9e2a39a824f3c27f4fcad9c9ff6c7cc71a2e314c5904a90ab37481ad0069d03cab9eaaac6eb68aca1bc3355fdb05f1045cd50e2aacea
+ languageName: node
+ linkType: hard
+
"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.3.2#~builtin":
version: 1.22.3
resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin::version=1.22.3&hash=c3c19d"
@@ -14279,6 +14362,16 @@ __metadata:
languageName: node
linkType: hard
+"resolve@patch:resolve@~1.19.0#~builtin":
+ version: 1.19.0
+ resolution: "resolve@patch:resolve@npm%3A1.19.0#~builtin::version=1.19.0&hash=c3c19d"
+ dependencies:
+ is-core-module: ^2.1.0
+ path-parse: ^1.0.6
+ checksum: 2443b94d347e6946c87c85faf13071f605e609e0b54784829b0ed2b917d050bfc1cbaf4ecc6453f224cfa7d0c5dcd97cbb273454cd210bee68e4af15c1a5abc9
+ languageName: node
+ linkType: hard
+
"responselike@npm:^1.0.2":
version: 1.0.2
resolution: "responselike@npm:1.0.2"
@@ -14763,6 +14856,18 @@ __metadata:
languageName: node
linkType: hard
+"shiki@npm:^0.14.1":
+ version: 0.14.3
+ resolution: "shiki@npm:0.14.3"
+ dependencies:
+ ansi-sequence-parser: ^1.1.0
+ jsonc-parser: ^3.2.0
+ vscode-oniguruma: ^1.7.0
+ vscode-textmate: ^8.0.0
+ checksum: a4dd98e3b2a5dd8be207448f111ffb9ad2ed6c530f215714d8b61cbf91ec3edbabb09109b8ec58a26678aacd24e8161d5a9bc0c1fa1b4f64b27ceb180cbd0c89
+ languageName: node
+ linkType: hard
+
"side-channel@npm:^1.0.4":
version: 1.0.4
resolution: "side-channel@npm:1.0.4"
@@ -16003,6 +16108,33 @@ __metadata:
languageName: node
linkType: hard
+"typedoc-plugin-markdown@npm:^3.15.3":
+ version: 3.15.3
+ resolution: "typedoc-plugin-markdown@npm:3.15.3"
+ dependencies:
+ handlebars: ^4.7.7
+ peerDependencies:
+ typedoc: ">=0.24.0"
+ checksum: 845d8907948a7ea9f3eed31d8c2f1a4053569fb763f5c5187d06ecbffd247c6a6e532eaf0ec09d11f09eabbf26a3df8646c96fc3ac1a836cc9af273fa0e53413
+ languageName: node
+ linkType: hard
+
+"typedoc@npm:^0.24.8":
+ version: 0.24.8
+ resolution: "typedoc@npm:0.24.8"
+ dependencies:
+ lunr: ^2.3.9
+ marked: ^4.3.0
+ minimatch: ^9.0.0
+ shiki: ^0.14.1
+ peerDependencies:
+ typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x
+ bin:
+ typedoc: bin/typedoc
+ checksum: a46a14497f789fb3594e6c3af2e45276934ac46df40b7ed15a504ee51dc7a8013a2ffb3a54fd73abca6a2b71f97d3ec9ad356fa9aa81d29743e4645a965a2ae0
+ languageName: node
+ linkType: hard
+
"typescript@npm:^4.5.2, typescript@npm:^4.7.4":
version: 4.9.5
resolution: "typescript@npm:4.9.5"
@@ -16526,6 +16658,20 @@ __metadata:
languageName: node
linkType: hard
+"vscode-oniguruma@npm:^1.7.0":
+ version: 1.7.0
+ resolution: "vscode-oniguruma@npm:1.7.0"
+ checksum: 53519d91d90593e6fb080260892e87d447e9b200c4964d766772b5053f5699066539d92100f77f1302c91e8fc5d9c772fbe40fe4c90f3d411a96d5a9b1e63f42
+ languageName: node
+ linkType: hard
+
+"vscode-textmate@npm:^8.0.0":
+ version: 8.0.0
+ resolution: "vscode-textmate@npm:8.0.0"
+ checksum: 127780dfea89559d70b8326df6ec344cfd701312dd7f3f591a718693812b7852c30b6715e3cfc8b3200a4e2515b4c96f0843c0eacc0a3020969b5de262c2a4bb
+ languageName: node
+ linkType: hard
+
"w3c-xmlserializer@npm:^4.0.0":
version: 4.0.0
resolution: "w3c-xmlserializer@npm:4.0.0"