corpus

Log | Files | Refs | README | LICENSE

commit 1bec5be07224d26f8e0c478aa33dd7ccf263846a
parent 6d5a660bc17c4bb57bbf8f5289ac010514c5fe22
Author: mtmn <miro@haravara.org>
Date:   Sat, 18 Apr 2026 17:09:40 +0200

fix: optimize client.js output

Diffstat:
Mflake.nix | 2+-
Mpackage-lock.json | 16+++++++++++++++-
Mpackage.json | 5+++--
3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -131,7 +131,7 @@ version = "1.0.0"; inherit src; - npmDepsHash = "sha256-yx8mCRd7moAAwVb7uu8U/xhkIsS8JYawonhGmkTUywU="; + npmDepsHash = "sha256-r9omGeMcGZUkAhXz4ZdZSn2ZOhhJ9Oo3za7iqyZXbqY="; npmRebuildFlags = ["--ignore-scripts"]; nativeBuildInputs = with pkgs; [ diff --git a/package-lock.json b/package-lock.json @@ -26,7 +26,8 @@ "purescript-psa": "^0.9.0", "purs-backend-es": "^1.4.3", "purs-tidy": "^0.11.1", - "spago": "^1.0.4" + "spago": "^1.0.4", + "uglify-js": "^3.19.3" } }, "node_modules/@aws-crypto/crc32": { @@ -6845,6 +6846,19 @@ "dev": true, "license": "MIT" }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/undici-types": { "version": "7.19.2", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", diff --git a/package.json b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "type": "module", "scripts": { - "build": "npx spago build && npx purs-backend-es build && npx esbuild output-es/Main/index.js --bundle --platform=node --format=esm --footer:js='main();' --outfile=server.js --external:http --external:https --external:dotenv --external:url --external:duckdb --external:@aws-sdk/client-s3 --external:prom-client --external:@opentelemetry/* && elm make src/Client.elm --output=client.js", + "build": "npx spago build && npx purs-backend-es build && npx esbuild output-es/Main/index.js --bundle --platform=node --format=esm --footer:js='main();' --outfile=server.js --external:http --external:https --external:dotenv --external:url --external:duckdb --external:@aws-sdk/client-s3 --external:prom-client --external:@opentelemetry/* && elm make src/Client.elm --optimize --output=client.js && npx uglifyjs client.js --compress \"pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe\" | npx uglifyjs --mangle --output client.js", "test": "npx spago test", "tidy": "purs-tidy format-in-place src/**/*.purs" }, @@ -17,7 +17,8 @@ "purescript-psa": "^0.9.0", "purs-backend-es": "^1.4.3", "purs-tidy": "^0.11.1", - "spago": "^1.0.4" + "spago": "^1.0.4", + "uglify-js": "^3.19.3" }, "dependencies": { "@aws-sdk/client-s3": "^3.1029.0",