Skip to content

Commit

Permalink
Compiling scripts requires at least PowerShell 7+
Browse files Browse the repository at this point in the history
  • Loading branch information
AmzGrainRain committed Oct 14, 2024
1 parent df308c7 commit f881280
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 73 deletions.
9 changes: 8 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ function Build_And_Package {
$buildDirectory = "${PSScriptRoot}\dist"
$publicDirectory = "${PSScriptRoot}\public"
$platformDirectory = "${PSScriptRoot}\platform\${buildType}"
if (-Not (Test-Path -Path $platformDirectory)) {
New-Item -ItemType Directory -Path $platformDirectory
}

Remove-Item -Path $buildDirectory -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path $publicDirectory -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item -Path $platformDirectory -Destination $publicDirectory -Recurse -Force

$null = Start-Process -FilePath "npm" -ArgumentList "run build" -NoNewWindow -Wait -PassThru -WorkingDirectory $PSScriptRoot
if ($IsWindows) {
$null = Start-Process -FilePath "npm.cmd" -ArgumentList "run build-src" -NoNewWindow -Wait -PassThru -WorkingDirectory $PSScriptRoot
} else {
$null = Start-Process -FilePath "npm" -ArgumentList "run build-src" -NoNewWindow -Wait -PassThru -WorkingDirectory $PSScriptRoot
}

Compress-Archive -Path "$buildDirectory\*" -DestinationPath "$buildDirectory\$buildType.zip"
Write-Host "build path: $buildDirectory"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"win-build": "powershell ./build.ps1",
"linux-build": "bash ./build.sh",
"build-src": "vue-tsc && vite build",
"build": "powershell ./build.ps1",
"preview": "vite preview"
},
"dependencies": {
Expand Down
11 changes: 0 additions & 11 deletions public/_locales/en/messages.json

This file was deleted.

11 changes: 0 additions & 11 deletions public/_locales/zh_CN/messages.json

This file was deleted.

Binary file removed public/assets/ico_128x128.png
Binary file not shown.
Binary file removed public/assets/ico_16x16.png
Binary file not shown.
Binary file removed public/assets/ico_200x200.png
Binary file not shown.
Binary file removed public/assets/ico_32x32.png
Binary file not shown.
Binary file removed public/assets/ico_48x48.png
Binary file not shown.
Binary file removed public/assets/ico_64x64.png
Binary file not shown.
Binary file removed public/assets/ico_80x80.png
Binary file not shown.
Binary file removed public/assets/ico_96x96.png
Binary file not shown.
7 changes: 0 additions & 7 deletions public/background.js

This file was deleted.

40 changes: 0 additions & 40 deletions public/manifest.json

This file was deleted.

0 comments on commit f881280

Please sign in to comment.