From 9b01bdcd076a06a864706e8306d0ed49bd3469ed Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 14:17:26 +0900 Subject: [PATCH 01/11] dotnet new tool-manifest --- .config/dotnet-tools.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..517f9b3 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file From f9dd95f2a4ddc3cb11536f64ff6ee1a74062e143 Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 14:19:41 +0900 Subject: [PATCH 02/11] dotnet tool install docfx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 次のコマンドを使用してこのディレクトリからツールを呼び出すことができます: 'dotnet tool run docfx' または 'dotnet docfx'。 バージョン固定するためにローカルインストールにしている。 --- .config/dotnet-tools.json | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 517f9b3..a0acf25 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -1,5 +1,12 @@ -{ - "version": 1, - "isRoot": true, - "tools": {} +{ + "version": 1, + "isRoot": true, + "tools": { + "docfx": { + "version": "2.73.0", + "commands": [ + "docfx" + ] + } + } } \ No newline at end of file From aaa1cd21cae96900038be78fb0c94cfb4a3c7ece Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 14:40:38 +0900 Subject: [PATCH 03/11] dotnet docfx init -q -o docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最小限にするためにarticlesは削除 docsというフォルダ名はUniTaskや公式リポジトリをみてdocsというフォルダ名を使っていることを確認したためそれを使用 https://github.com/Unity-Technologies/ml-agents/tree/develop/docs 最小限APIリファレンスさえあればいいためコマンドで生成されたarticlesフォルダは削除した。 dotnet docfx docs/docfx.json --serve で確認できる --- docs/.gitignore | 9 +++++++ docs/api/.gitignore | 5 ++++ docs/api/index.md | 2 ++ docs/docfx.json | 58 +++++++++++++++++++++++++++++++++++++++++++++ docs/index.md | 4 ++++ docs/toc.yml | 3 +++ 6 files changed, 81 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/api/.gitignore create mode 100644 docs/api/index.md create mode 100644 docs/docfx.json create mode 100644 docs/index.md create mode 100644 docs/toc.yml diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..2781f6d --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,9 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site diff --git a/docs/api/.gitignore b/docs/api/.gitignore new file mode 100644 index 0000000..f798527 --- /dev/null +++ b/docs/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 0000000..1cb6831 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,2 @@ +# PLACEHOLDER +TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..cda7be5 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,58 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "bin/**/*.dll" + ] + } + ], + "dest": "api", + "outputFormat": "mref", + "includePrivateMembers": false, + "disableGitFeatures": false, + "disableDefaultFilter": false, + "noRestore": false, + "namespaceLayout": "flattened", + "memberLayout": "samePage", + "enumSortOrder": "alphabetic", + "allowCompilationErrors": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md" + ] + }, + { + "files": [ + "articles/**.md", + "articles/**/toc.yml", + "toc.yml", + "*.md" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default", + "modern" + ], + "postProcessors": [], + "keepFileLink": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..95887de --- /dev/null +++ b/docs/index.md @@ -0,0 +1,4 @@ +# This is the **HOMEPAGE**. +Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. +## Quick Start Notes: +1. Add images to the *images* folder if the file is referencing an image. diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..4869c98 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,3 @@ +- name: Api Documentation + href: api/ + homepage: api/index.md From 2894296e663f7c5a768599f6a503d2b88cb61f41 Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 21:28:48 +0900 Subject: [PATCH 04/11] set metadata src files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 生成する対象のファイルを指定。 ドキュメント https://dotnet.github.io/docfx/reference/docfx-json-reference.html#file-mappings ## filesの指定方法 csproj, dll, csの3択ありそう。 https://dotnet.github.io/docfx/docs/dotnet-api-docs.html#generate-from-source-code UnityEngineへの参照を回避できるのはcsのみのためそれを使用している。 --- docs/docfx.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/docfx.json b/docs/docfx.json index cda7be5..6d5972e 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -4,8 +4,13 @@ "src": [ { "files": [ - "bin/**/*.dll" - ] + "Packages/com.teach310.core-bluetooth-for-unity/Runtime/**/*.cs" + ], + "exclude": [ + "Packages/com.teach310.core-bluetooth-for-unity/Runtime/Initializer.cs", + "Packages/com.teach310.core-bluetooth-for-unity/Runtime/NativeCallbacks/*.cs" + ], + "src": ".." } ], "dest": "api", From 212f80e68a57dda924445191c6c595e64f149ddd Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:00:58 +0900 Subject: [PATCH 05/11] docs set api homepage CoreBluetooth namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit APIReferenceのindexが不要だったため削除 toc.ymlのhomepageにはmetadataによって生成したファイル名を書くようたっだためymlを指定 > /UnityProjects/CoreBluetoothForUnity/docs/toc.yml(0,1): warning InvalidFileLink: Invalid file link:(~/api/CoreBluetooth.html). --- docs/api/index.md | 2 -- docs/docfx.json | 5 +---- docs/toc.yml | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 docs/api/index.md diff --git a/docs/api/index.md b/docs/api/index.md deleted file mode 100644 index 1cb6831..0000000 --- a/docs/api/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# PLACEHOLDER -TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/docs/docfx.json b/docs/docfx.json index 6d5972e..c91e352 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -29,14 +29,11 @@ "content": [ { "files": [ - "api/**.yml", - "api/index.md" + "api/**.yml" ] }, { "files": [ - "articles/**.md", - "articles/**/toc.yml", "toc.yml", "*.md" ] diff --git a/docs/toc.yml b/docs/toc.yml index 4869c98..14ea9de 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1,3 +1,3 @@ - name: Api Documentation href: api/ - homepage: api/index.md + homepage: api/CoreBluetooth.yml From d5f290c7daa7b3eb4b7569c61886e0fa4fa822b2 Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:01:31 +0900 Subject: [PATCH 06/11] add make docs/clean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _siteフォルダを消さないと新しく生成してくれなかったため --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 49158fd..9573ba6 100644 --- a/Makefile +++ b/Makefile @@ -30,3 +30,7 @@ package/build: plugins/build: make -C Plugins/CoreBluetoothForUnity dylib make -C Plugins/CoreBluetoothForUnity framework + +.PHONY: docs/clean +docs/clean: + rm -rf ./docs/_site From cdf941e81105f46ae6639dcfdbbdd2d4eb192510 Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:02:06 +0900 Subject: [PATCH 07/11] =?UTF-8?q?Repository=E3=81=B8=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=B3=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UniTaskのを真似た https://cysharp.github.io/UniTask/ --- docs/toc.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/toc.yml b/docs/toc.yml index 14ea9de..8407e0e 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1,3 +1,6 @@ - name: Api Documentation href: api/ homepage: api/CoreBluetooth.yml + +- name: Repository + href: https://github.com/teach310/CoreBluetoothForUnity From 7de1be7550fa7ca60d8f46f46c3e94f69357340b Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:19:03 +0900 Subject: [PATCH 08/11] set globalMetadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://dotnet.github.io/docfx/reference/docfx-json-reference.html#predefined-metadata 外部サイトだったら別リンクに飛んでほしいため_enableNewTabはtrueにした。 ただし、Repositoryはnewタブにならなかった --- docs/docfx.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docfx.json b/docs/docfx.json index c91e352..7024b21 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -47,7 +47,12 @@ } ], "output": "_site", - "globalMetadataFiles": [], + "globalMetadata": { + "_appTitle": "CoreBluetoothForUnity", + "_appName": "CoreBluetoothForUnity", + "_enableSearch": true, + "_enableNewTab": true + }, "fileMetadataFiles": [], "template": [ "default", From 285ca7f79bea6d4071422731132e22816c6ae400 Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:38:49 +0900 Subject: [PATCH 09/11] set enumSortOrder declaringOrder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ソースコードと同じ順に並べてほしいため --- docs/docfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docfx.json b/docs/docfx.json index 7024b21..1a58570 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -21,7 +21,7 @@ "noRestore": false, "namespaceLayout": "flattened", "memberLayout": "samePage", - "enumSortOrder": "alphabetic", + "enumSortOrder": "declaringOrder", "allowCompilationErrors": false } ], From 365654cc91fa0580192784a098e9ef45aee0912f Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 22:48:52 +0900 Subject: [PATCH 10/11] update index.md --- docs/index.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 95887de..30e2b68 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,5 @@ -# This is the **HOMEPAGE**. -Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. -## Quick Start Notes: -1. Add images to the *images* folder if the file is referencing an image. +# CoreBluetoothForUnity + +Provides native Apple CoreBluetooth integration for use with Unity. + +https://github.com/teach310/CoreBluetoothForUnity From d0d9f08c1b1aa689e3b002ad0f1cfbc1816e5f3b Mon Sep 17 00:00:00 2001 From: teach310 Date: Sun, 5 Nov 2023 23:43:17 +0900 Subject: [PATCH 11/11] filter System.Object, CoreBluetooth.Foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://dotnet.github.io/docfx/docs/dotnet-api-docs.html#filter-apis System.Objectを除外する件についてのissue https://github.com/dotnet/docfx/issues/1780 --- docs/docfx.json | 1 + docs/filterConfig.yml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 docs/filterConfig.yml diff --git a/docs/docfx.json b/docs/docfx.json index 1a58570..2f32516 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -18,6 +18,7 @@ "includePrivateMembers": false, "disableGitFeatures": false, "disableDefaultFilter": false, + "filter": "filterConfig.yml", "noRestore": false, "namespaceLayout": "flattened", "memberLayout": "samePage", diff --git a/docs/filterConfig.yml b/docs/filterConfig.yml new file mode 100644 index 0000000..dd2f58b --- /dev/null +++ b/docs/filterConfig.yml @@ -0,0 +1,7 @@ +apiRules: +- exclude: + uidRegex: ^System\.Object + type: Type +- exclude: + uidRegex: ^CoreBluetooth\.Foundation + type: Namespace