From bf8caca40e7b6ed538c463337940605e97a1cbd9 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Fri, 3 Feb 2023 20:28:50 +0100 Subject: [PATCH] Update build and bundle scripts --- SteamTweaks/package-lock.json | 33 +++++++++++++++++++++++++-------- SteamTweaks/package.json | 9 ++++++++- build.ps1 | 6 ++++++ bundle-zip.ps1 | 1 + 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/SteamTweaks/package-lock.json b/SteamTweaks/package-lock.json index e8233e5..fe56501 100644 --- a/SteamTweaks/package-lock.json +++ b/SteamTweaks/package-lock.json @@ -8,6 +8,9 @@ "name": "glossi_steamtweaks", "version": "0.0.0", "license": "Apache-2.0", + "dependencies": { + "rimraf": "^4.1.2" + }, "devDependencies": { "@rollup/plugin-typescript": "^11.0.0", "@typescript-eslint/eslint-plugin": "^5.49.0", @@ -1205,6 +1208,21 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatted": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", @@ -2222,15 +2240,14 @@ } }, "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", "bin": { - "rimraf": "bin.js" + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" diff --git a/SteamTweaks/package.json b/SteamTweaks/package.json index 2515d70..65a4b72 100644 --- a/SteamTweaks/package.json +++ b/SteamTweaks/package.json @@ -2,7 +2,11 @@ "name": "glossi_steamtweaks", "version": "0.0.0", "type": "module", - "scripts": {}, + "scripts": { + "clean": "npx rimraf dist .rollup.tscache tsconfig.tsbuildinfo ", + "build": "npx rollup -c rollup.config.js", + "build:clean": "npm run clean && npm run build" + }, "author": "Peter Repukat - FlatspotSoftware", "license": "Apache-2.0", "devDependencies": { @@ -15,5 +19,8 @@ "eslint-plugin-prefer-arrow": "^1.2.3", "rollup": "^3.12.0", "typescript": "^4.9.4" + }, + "dependencies": { + "rimraf": "^4.1.2" } } diff --git a/build.ps1 b/build.ps1 index 0dcaa40..60f181b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,6 +5,10 @@ Remove-Item -Recurse -Force "x64\Release" $env:_CL_="/MD" msbuild.exe GlosSI.sln /t:Build /p:Configuration=Release /p:Platform=x64 +cd ./SteamTweaks +npm i +npm run build +cd .. cd ./x64/Release/ @@ -26,6 +30,8 @@ Copy-Item "..\..\vc_redist.x64.exe" -Destination "." Copy-Item "..\..\LICENSE" -Destination "./LICENSE" Copy-Item "..\..\QT_License" -Destination "./QT_License" Copy-Item "..\..\THIRD_PARTY_LICENSES.txt" -Destination "./THIRD_PARTY_LICENSES.txt" +Copy-Item "..\..\SteamTweaks\dist" -Destination "./SteamTweaks" -Recurse + #7z a GlosSI-snapshot.zip * diff --git a/bundle-zip.ps1 b/bundle-zip.ps1 index dffea33..ba57349 100644 --- a/bundle-zip.ps1 +++ b/bundle-zip.ps1 @@ -19,6 +19,7 @@ Copy-Item "..\..\LICENSE" -Destination "./LICENSE" Copy-Item "..\..\QT_License" -Destination "./QT_License" Copy-Item "..\..\THIRD_PARTY_LICENSES.txt" -Destination "./THIRD_PARTY_LICENSES.txt" Copy-Item "..\..\steamgrid.exe" -Destination "./steamgrid.exe" +Copy-Item "..\..\SteamTweaks\dist" -Destination "./SteamTweaks" -Recurse Copy-Item "C:\Qt\Tools\OpenSSL\Win_x64\bin\libcrypto-1_1-x64.dll" -Destination "./libcrypto-1_1-x64.dll" Copy-Item "C:\Qt\Tools\OpenSSL\Win_x64\bin\libssl-1_1-x64.dll" -Destination "./libssl-1_1-x64.dll"