Skip to content

Commit 9076e0d

Browse files
committed
ADd client and server README.jp.md
1 parent a08237e commit 9076e0d

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

src/client/README.jp.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Client (React アプリのソースコード)
2+
3+
このディレクトリは、クライアント側の React アプリのソースコードを保存する場所です。
4+
5+
アプリは複数のダイアログ ウィンドウを開くメニュー項目を作成するため、ここには複数のディレクトリがあります。 各ダイアログは個別のアプリを開くため、ここの各ディレクトリは独自の個別の React アプリを表します。 webpack 構成は、React アプリごとに個別のバンドルを生成します。
6+
7+
## 要件
8+
9+
以下、React アプリごとに必要になります。:
10+
11+
- アプリをロードするエントリポイント`index.js`ファイル
12+
- バンドルされた React アプリを読み込むためのテンプレート HTML ファイル
13+
14+
[webpack.config.js](../../webpack.config.js) で次のように宣言する必要があります。
15+
16+
- **name**: webpack コンソールに出力する名前です。例:`CLIENT - Dialog Demo`
17+
- **entry**: アプリのエントリ ポイントへのパス。例:`./src/client/dialog-demo/index.js`
18+
- **filename**: 生成される html ファイルの名前。 サーバー コードはこのファイル名を参照して、アプリをダイアログ ウィンドウに読み込みます。例:`dialog-demo`
19+
- **template**: アプリの HTML テンプレートへのパス。 例:`./src/client/dialog-demo/index.html`
20+
21+
### エントリポイントの追加または削除
22+
23+
Your app or use case may only require a single dialog or sidebar, or you may want to add more than are included in the sample app.
24+
25+
アプリまたはユースケースで必要なダイアログまたはサイドバーは、1 つだけの場合もあれば、サンプルアプリに含まれている以上のダイアログ、サイドバーを追加したい場合もあります。
26+
27+
エントリポイントを編集するには、次のことを行う必要があります:
28+
29+
1. Create or remove the entrypoint directories in the client source code. For instance, you can remove `./src/client/sidebar-about-page` altogether, or copy it and modify the source code. See above [requirements](#requirements).
30+
31+
クライアントのソースコードで、エントリポイントディレクトリを作成または削除します。 たとえば、`./src/client/sidebar-about-page`を削除したり、コピーしてソースコードを変更したりできます。 上記の [要件](#要件) を参照してください。
32+
33+
2. Modify the server-side code to load the correct menu items and expose the correct public functions:
34+
35+
3. サーバー側のコードを変更して、正しいメニュー項目をロードし、正しい public 関数を公開します。
36+
37+
- [ui file](../server/ui.js)
38+
- [index file](../server/index.js)
39+
40+
4. [webpack 設定ファイル](../../webpack.config.js)`clientEntrypoints` 構成を変更します。

src/server/README.jp.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Server (our Google Apps Script code)
2+
3+
このディレクトリは、Google サーバーで実行される Google Apps Script のコードを保存する場所です。
4+
5+
## Requirements
6+
7+
サーバーコードには次のものが必要です。
8+
9+
- アプリをロードするエントリポイント(`index.ts`という名前のファイル)。
10+
- 以下のようにエントリポイントで、public 関数を`import``export`する必要があります。
11+
12+
```javascript
13+
import { someFunction } from './ui';
14+
export { someFunction };
15+
```
16+
17+
[ui.js](./ui.js)ファイルを参照すると、メニューにメニュー項目を追加する方法、開発設定を適切に設定する方法がわかります。
18+
19+
## ビルド
20+
21+
ここのサーバー側コードは、[v8 ランタイム](https://developers.google.com/apps-script/guides/v8-runtime) と互換性のある設定を使用してコンパイルされます。
22+
23+
設定(権限設定、ランタイムなど)を切り替える場合は、[appsscript.json](../../appsscript.json)ファイルを更新してください。

0 commit comments

Comments
 (0)