Add reminder management improvements
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$manifestPath = Join-Path $root "manifest.json"
|
||||
$manifest = Get-Content -Raw -LiteralPath $manifestPath | ConvertFrom-Json
|
||||
$releaseDir = Join-Path $root "dist"
|
||||
$stagingDir = Join-Path $releaseDir "reminder-notifier"
|
||||
$zipPath = Join-Path $releaseDir ("reminder-notifier-" + $manifest.version + ".zip")
|
||||
|
||||
if (Test-Path -LiteralPath $stagingDir) {
|
||||
Remove-Item -LiteralPath $stagingDir -Recurse -Force
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Path $stagingDir | Out-Null
|
||||
Copy-Item -LiteralPath (Join-Path $root "manifest.json") -Destination $stagingDir
|
||||
Copy-Item -LiteralPath (Join-Path $root "main.js") -Destination $stagingDir
|
||||
Copy-Item -LiteralPath (Join-Path $root "styles.css") -Destination $stagingDir
|
||||
|
||||
if (Test-Path -LiteralPath $zipPath) {
|
||||
Remove-Item -LiteralPath $zipPath -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $stagingDir "*") -DestinationPath $zipPath
|
||||
Write-Host "Release archive created: $zipPath"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import esbuild from "esbuild";
|
||||
import { pathToFileURL } from "node:url";
|
||||
|
||||
await esbuild.build({
|
||||
entryPoints: ["tests/date.test.ts"],
|
||||
bundle: true,
|
||||
platform: "node",
|
||||
target: "node20",
|
||||
outfile: "dist-tests/date.test.mjs",
|
||||
format: "esm",
|
||||
logLevel: "silent",
|
||||
});
|
||||
|
||||
await import(pathToFileURL(`${process.cwd()}/dist-tests/date.test.mjs`).href);
|
||||
console.log("Tests passed.");
|
||||
|
||||
Reference in New Issue
Block a user