From 72f127a5755620270182fe750f42aeefa32a0f19 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Wed, 28 Feb 2024 18:15:15 +1100 Subject: [PATCH] chore: update scripts to auto upload to sentry etc. --- .gitignore | 3 +++ package.json | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 276ca354..44c01f51 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ dist/ # Sentry Config File .env.sentry-build-plugin + +# Sentry Config File +.sentryclirc diff --git a/package.json b/package.json index 45d48bd0..34dd6ec9 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,16 @@ "browserslist": "> 0.5%, last 2 versions, not dead", "scripts": { "dev": "parcel watch manifest.json --host localhost --config @parcel/config-webextension --no-hmr --no-content-hash", - "build": "parcel build manifest.json --config @parcel/config-webextension --no-content-hash --no-cache", "dev:firefox": "parcel watch firefox/manifest.json --host localhost --config @parcel/config-webextension --no-hmr --no-content-hash", + + "build": "parcel build manifest.json --config @parcel/config-webextension --no-content-hash --no-cache", "build:firefox": "parcel build firefox/manifest.json --config @parcel/config-webextension --no-content-hash --no-cache", - "eslint": "eslint --fix .", - "package": "7z a -tzip extension.zip ./dist/*" + + "production": "rimraf ./dist/* && npm-run-all build sentry:sourcemaps sentry:popup-sourcemaps package", + + "sentry:sourcemaps": "sentry-cli sourcemaps inject --org betterseqta-plus --project betterseqtaplus-main ./dist && sentry-cli sourcemaps upload --org betterseqta-plus --project betterseqtaplus-main ./dist", + "sentry:popup-sourcemaps": "sentry-cli sourcemaps inject --org betterseqta-plus --project betterseqtaplus-popup ./dist && sentry-cli sourcemaps upload --org betterseqta-plus --project betterseqtaplus-popup ./dist", + "package": "rimraf ./dist/*.map && 7z a -tzip extension.zip ./dist/*" }, "targets": { "prod": { @@ -40,6 +45,7 @@ "dependencies": { "@parcel/transformer-raw": "^2.11.0", "@sentry/browser": "^7.100.1", + "@sentry/cli": "^2.28.6", "@sentry/react": "^7.100.1", "@types/color": "^3.0.6", "@types/dompurify": "^3.0.5", @@ -55,15 +61,17 @@ "localforage": "^1.10.0", "motion": "^10.17.0", "npm": "^10.4.0", + "npm-run-all": "^4.1.5", "postcss": "^8.4.35", "react": "^18.2.0", "react-best-gradient-color-picker": "^3.0.5", "react-dom": "^18.2.0", "react-router-dom": "^6.22.0", + "rimraf": "^5.0.5", "sortablejs": "^1.15.2", "tailwindcss": "^3.4.1", "ts-loader": "^9.5.1", "typescript": "^5.3.3", "webextension-polyfill": "^0.10.0" } -} +} \ No newline at end of file