5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 03:52:41 +08:00

docs: optimize code block display style (#2520)

This commit is contained in:
Misite Bao 2023-03-22 18:54:08 +08:00 committed by GitHub
parent 7d28ad1a3b
commit 93d7c6b5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,45 +8,79 @@ The project config resides in the `wails.json` file in the project directory. Th
```json ```json
{ {
"name": "[The project name]", // Project config version
"assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]", "version": "",
"reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]", // The project name
"build:dir": "[The directory where the build files reside. Defaults to 'build']", "name": "",
"frontend:dir": "[Relative path to the frontend directory. Defaults to 'frontend']", // Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty
"frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]", "assetdir": "",
"frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]", // Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations
"frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]", "reloaddirs": "",
"frontend:dev:build": "[This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev]", // The directory where the build files reside. Defaults to 'build'
"frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]", "build:dir": "",
"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]", // Relative path to the frontend directory. Defaults to 'frontend'
"frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output]", "frontend:dir": "",
"wailsjsdir": "[Relative path to the directory that the auto-generated JS modules will be created]", // The command to install node dependencies, run in the frontend directory - often `npm install`
"version": "[Project config version]", "frontend:install": "",
"outputfilename": "[The name of the binary]", // The command to build the assets, run in the frontend directory - often `npm run build`
"debounceMS": 100, // The default time the dev server waits to reload when it detects a change in assets "frontend:build": "",
"devServer": "[Address to bind the wails dev sever to. Default: localhost:34115]", // This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build
"appargs": "[Arguments passed to the application in shell style when in dev mode]", "frontend:dev": "",
"runNonNativeBuildHooks": false, // Defines if build hooks should be run though they are defined for an OS other than the host OS. // This command is the dev equivalent of frontend:build. If not specified falls back to frontend:dev
"preBuildHooks": { "frontend:dev:build": "",
"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.]", // This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install
"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.]", "frontend:dev:install": "",
"*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]" // This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers
}, "frontend:dev:watcher": "",
"postBuildHooks": { // URL to a 3rd party dev server to be used to serve assets, EG Vite. \nIf this is set to 'auto' then the devServerUrl will be inferred from the Vite output
"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.]", "frontend:dev:serverUrl": "",
"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.]", // Relative path to the directory that the auto-generated JS modules will be created
"*/*": "[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.]" "wailsjsdir": "",
}, // The name of the binary
"info": { // Data used to populate manifests and version info. "outputfilename": "",
"companyName": "[The company name. Default: [The project name]]", // The default time the dev server waits to reload when it detects a change in assets
"productName": "[The product name. Default: [The project name]]", "debounceMS": 100,
"productVersion": "[The version of the product. Default: '1.0.0']", // Address to bind the wails dev sever to. Default: localhost:34115
"copyright": "[The copyright of the product. Default: 'Copyright.........']", "devServer": "",
"comments": "[A short comment of the app. Default: 'Built using Wails (https://wails.app)']" // Arguments passed to the application in shell style when in dev mode
}, "appargs": "",
"nsisType": "['multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple']", // Defines if build hooks should be run though they are defined for an OS other than the host OS.
"obfuscated": "[Whether the app should be obfuscated. Default: false]", "runNonNativeBuildHooks": false,
"garbleargs": "[The arguments to pass to the garble command when using the obfuscated flag]" "preBuildHooks": {
// 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/GOARCH": "",
// 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.
"GOOS/*": "",
// The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".
"*/*": ""
},
"postBuildHooks": {
// 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/GOARCH": "",
// 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.
"GOOS/*": "",
// 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.
"*/*": ""
},
// Data used to populate manifests and version info.
"info": {
// The company name. Default: [The project name]
"companyName": "",
// The product name. Default: [The project name]
"productName": "",
// The version of the product. Default: '1.0.0'
"productVersion": "",
// The copyright of the product. Default: 'Copyright.........'
"copyright": "",
// A short comment of the app. Default: 'Built using Wails (https://wails.app)'
"comments": ""
},
// 'multiple': One installer per architecture. 'single': Single universal installer for all architectures being built. Default: 'multiple'
"nsisType": "",
// Whether the app should be obfuscated. Default: false
"obfuscated": "",
// The arguments to pass to the garble command when using the obfuscated flag
"garbleargs": ""
} }
``` ```