From 3ac0bb8a7455fbc9953cab7a51d5237e1373a56e Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 3 Jun 2024 23:18:51 +0200 Subject: [PATCH] add fix to prevent accumulation of dist.zip content --- .../custom-template/template/web-app/ui/package.json.hbs | 4 ++-- templates/lit/web-app/ui/package.json.hbs | 4 ++-- templates/svelte/web-app/ui/package.json.hbs | 5 +++-- templates/vanilla/example/ui/package.json.hbs | 2 +- templates/vanilla/web-app/ui/package.json.hbs | 2 +- templates/vue/web-app/ui/package.json.hbs | 5 +++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/templates/custom-template/custom-template/template/web-app/ui/package.json.hbs b/templates/custom-template/custom-template/template/web-app/ui/package.json.hbs index e6e4243e9..33e216610 100644 --- a/templates/custom-template/custom-template/template/web-app/ui/package.json.hbs +++ b/templates/custom-template/custom-template/template/web-app/ui/package.json.hbs @@ -6,11 +6,11 @@ "build": "vite build", {{#if holo_enabled}} "build:holo": "VITE_APP_IS_HOLO=true vite build", - "package:holo": "npm run build:holo && cd dist && bestzip ../dist.zip *", + "package:holo": "npm run build:holo && rimraf dist.zip && cd dist && bestzip ../dist.zip *", {{/if}} "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore", "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", diff --git a/templates/lit/web-app/ui/package.json.hbs b/templates/lit/web-app/ui/package.json.hbs index e6e4243e9..33e216610 100644 --- a/templates/lit/web-app/ui/package.json.hbs +++ b/templates/lit/web-app/ui/package.json.hbs @@ -6,11 +6,11 @@ "build": "vite build", {{#if holo_enabled}} "build:holo": "VITE_APP_IS_HOLO=true vite build", - "package:holo": "npm run build:holo && cd dist && bestzip ../dist.zip *", + "package:holo": "npm run build:holo && rimraf dist.zip && cd dist && bestzip ../dist.zip *", {{/if}} "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore", "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", diff --git a/templates/svelte/web-app/ui/package.json.hbs b/templates/svelte/web-app/ui/package.json.hbs index ea073402a..a13032ca7 100644 --- a/templates/svelte/web-app/ui/package.json.hbs +++ b/templates/svelte/web-app/ui/package.json.hbs @@ -6,10 +6,10 @@ "build": "npm run check && vite build", {{#if holo_enabled}} "build:holo": "VITE_APP_IS_HOLO=true vite build", - "package:holo": "npm run build:holo && cd dist && bestzip ../dist.zip *", + "package:holo": "npm run build:holo && rimraf dist.zip && cd dist && bestzip ../dist.zip *", {{/if}} "check": "svelte-check --tsconfig ./tsconfig.json", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", @@ -33,6 +33,7 @@ "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "bestzip": "^2.2.0", + "rimraf": "^3.0.2", "svelte": "^3.55.1", "svelte-check": "^2.10.3", "tslib": "^2.4.1", diff --git a/templates/vanilla/example/ui/package.json.hbs b/templates/vanilla/example/ui/package.json.hbs index 5057d68da..5bc17095c 100644 --- a/templates/vanilla/example/ui/package.json.hbs +++ b/templates/vanilla/example/ui/package.json.hbs @@ -6,7 +6,7 @@ "scripts": { "start": "vite --clearScreen false --port $UI_PORT", "build": "vite build", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", diff --git a/templates/vanilla/web-app/ui/package.json.hbs b/templates/vanilla/web-app/ui/package.json.hbs index f168a4342..9750d0c34 100644 --- a/templates/vanilla/web-app/ui/package.json.hbs +++ b/templates/vanilla/web-app/ui/package.json.hbs @@ -6,7 +6,7 @@ "scripts": { "start": "vite --clearScreen false --port $UI_PORT", "build": "vite build", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", diff --git a/templates/vue/web-app/ui/package.json.hbs b/templates/vue/web-app/ui/package.json.hbs index 30525a98b..eeb874a9a 100644 --- a/templates/vue/web-app/ui/package.json.hbs +++ b/templates/vue/web-app/ui/package.json.hbs @@ -6,11 +6,11 @@ "build": "npm run check && vite build", {{#if holo_enabled}} "build:holo": "VITE_APP_IS_HOLO=true vite build", - "package:holo": "npm run build:holo && cd dist && bestzip ../dist.zip *", + "package:holo": "npm run build:holo && rimraf dist.zip && cd dist && bestzip ../dist.zip *", {{/if}} "check": "vue-tsc --noEmit", "preview": "vite preview", - "package": "npm run build && cd dist && bestzip ../dist.zip *" + "package": "npm run build && rimraf dist.zip && cd dist && bestzip ../dist.zip *" }, "dependencies": { "@holochain/client": "{{holochain_client_version}}", @@ -34,6 +34,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^4.0.0", "bestzip": "^2.2.0", + "rimraf": "^3.0.2", "typescript": "^4.9.3", "vite": "^4.0.4", "vite-plugin-checker": "^0.5.1",