Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.json: add watch:run-test-server #17

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,22 @@
* 自己署名証明書のインポート
* パーソナルHTTPS Webサーバーのビルド
* `dist`を`tests\run-test-server\web`にコピー
* テスト用の設定ファイル`tests\run-test-server\configs`を`tests\run-test-server\web`にコピー
* パーソナルHTTPS Webサーバーで`tests\run-test-server\web`をホスティング
* https://127.0.0.1:10041でアクセスできるようになる

#### `src`配下の変更を`tests\run-test-server\web`に自動で反映する

`run-test-server.bat`を実行中に、`src`配下への変更を`tests\run-test-server\web`に自動で反映したい場合、
別のコマンドプロンプトを開き、本リポジトリのルートで以下のnpmコマンドを実行する。

```
npm run watch:run-test-server
```

上記のコマンドを実行すると、10秒ごとに`src`の変更を監視し、変更があればリビルドして`tests\run-test-server\web`に出力する。
上記コマンド実行時、証明書のインポートを求められた場合はインポートすること。

### Outlookでのテストを行う。

* 以下のいずれかの方法でアドイン追加ページを呼び出す
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"stop": "office-addin-debugging stop manifest.xml",
"test": "run-tiny-esm-test-runner tests/unit/test-*.mjs",
"validate": "office-addin-manifest validate manifest.xml",
"watch": "webpack --mode development --watch"
"watch": "webpack --mode development --watch",
"watch:run-test-server": "webpack --mode production --watch --output-path tests/run-test-server/web --watch-options-poll=10000"
},
"dependencies": {
"@microsoft/office-js": "^1.1.90",
Expand Down