mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:51:16 +08:00

* docs: standardize JavaScript and TypeScript name writing * docs: sync translated documents * docs: fix broken link * docs: sync translated documents
58 lines
5.2 KiB
Plaintext
58 lines
5.2 KiB
Plaintext
---
|
|
sidebar_position: 5
|
|
---
|
|
|
|
# Project Config
|
|
|
|
The project config resides in the `wails.json` file in the project directory. The structure of the config is:
|
|
|
|
```json
|
|
{
|
|
"name": "[プロジェクト名。]",
|
|
"assetdir": "[コンパイルされたアセットディレクトリへの相対パス。通常は自動的に推測されるため、空で構いません。]",
|
|
"reloaddirs": "[再読み込みのトリガーとなる追加のディレクトリ(カンマ区切り)。高度なアセット構成をとる場合にのみ使用します。]",
|
|
"build:dir": "[ビルドファイルが存在するディレクトリ。 デフォルトは'build'です。']",
|
|
"frontend:dir": "[フロントエンドディレクトリの相対パス。 デフォルトは'frontend'です。]",
|
|
"frontend:install": "[node依存関係をインストールするために、フロントエンドディレクトリで実行するコマンド。一般的には`npm install`です。]",
|
|
"frontend:build": "[アセットをビルドするために、フロントエンドディレクトリで実行するコマンド。一般的には`npm run build`です。]",
|
|
"frontend:dev": "[このコマンドはfrontend:dev:buildへ置換されました。 If frontend:dev:build is not specified will falls back to this command. このコマンドも指定されていない場合は、代わりにfrontend:buildが実行されます。]",
|
|
"frontend:dev:build": "[開発モードにおけるfrontend:buildと同様のコマンド。 If not specified falls back to frontend:dev]",
|
|
"frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]",
|
|
"frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]",
|
|
"frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. 'auto'に設定すると、Viteの出力から自動的に開発サーバURLを推測します。]",
|
|
"wailsjsdir": "[自動生成されるJSモジュールを出力するディレクトリへの相対パス。]",
|
|
"version": "[プロジェクト構成のバージョン]",
|
|
"outputfilename": "[出力バイナリのファイル名]",
|
|
"debounceMS": 100, // アセットファイルに変更があった場合に、開発サーバが再読み込みを行うまでのデフォルトの待ち時間。
|
|
"devServer": "[Wailsの開発サーバをバインドするアドレス。 Default: localhost:34115]",
|
|
"appargs": "[Arguments passed to the application in shell style when in dev mode]",
|
|
"runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS.
|
|
"preBuildHooks": {
|
|
"GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]",
|
|
"GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]",
|
|
"*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]"
|
|
},
|
|
"postBuildHooks": {
|
|
"GOOS/GOARCH": "[The command that will be executed after a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]",
|
|
"GOOS/*": "[The command that will be executed after a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary. The "GOOS/*" hook is executed before the "*/*" hook.]",
|
|
"*/*": "[The command that will be executed after every build: ${platform} is replaced with the "GOOS/GOARCH" and ${bin} with the path to the compiled binary.]"
|
|
},
|
|
"info": { // Data used to populate manifests and version info.
|
|
"companyName": "[The company name. Default: [The project name]]",
|
|
"productName": "[The product name. Default: [The project name]]",
|
|
"productVersion": "[The version of the product. Default: '1.0.0']",
|
|
"copyright": "[The copyright of the product. Default: 'Copyright.........']",
|
|
"comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']"
|
|
},
|
|
"nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. デフォルト値: 'multiple']",
|
|
"obfuscated": "[アプリ難読化を実行するかどうか。 デフォルト値: false]",
|
|
"garbleargs": "[obfuscatedフラグがtrueの際に、garbleコマンドへ渡す引数。]"
|
|
}
|
|
```
|
|
|
|
This file is read by the Wails CLI when running `wails build` or `wails dev`.
|
|
|
|
The `assetdir`, `reloaddirs`, `wailsjsdir`, `debounceMS`, `devserver` and `frontenddevserverurl` flags in `wails build/dev` will update the project config and thus become defaults for subsequent runs.
|
|
|
|
このファイルのJSONスキーマは、[こちら](https://wails.io/schemas/config.v2.json)にあります。
|