feat: the pake debug option should support build a debug application

This commit is contained in:
jeasonnow
2023-06-27 18:32:05 +08:00
parent 03d7a2c7ff
commit c37db9a918
2 changed files with 3 additions and 1 deletions

View File

@@ -98,7 +98,8 @@ export default abstract class BaseBuilder {
abstract getFileName(): string; abstract getFileName(): string;
protected getBuildCommand(): string { protected getBuildCommand(): string {
return 'npm run build'; // the debug option should support `--debug` and `--release`
return this.options.debug ? 'npm run build:debug' : 'npm run build';
} }
protected getBasePath(): string { protected getBasePath(): string {

View File

@@ -33,6 +33,7 @@
"start": "npm run dev", "start": "npm run dev",
"dev": "npm run tauri dev", "dev": "npm run tauri dev",
"build": "npm run tauri build --release", "build": "npm run tauri build --release",
"build:debug": "npm run tauri build -- --debug",
"build:mac": "npm run tauri build -- --target universal-apple-darwin", "build:mac": "npm run tauri build -- --target universal-apple-darwin",
"build:all-unix": "chmod +x ./script/build.sh && ./script/build.sh", "build:all-unix": "chmod +x ./script/build.sh && ./script/build.sh",
"build:all-windows": "pwsh ./script/build.ps1", "build:all-windows": "pwsh ./script/build.ps1",