Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

feat(chrome-extension): add zip script and update .gitignore for zip files

AykutSarac8ca94dad3604
diff --git a/apps/chrome-extension/.gitignore b/apps/chrome-extension/.gitignore
index 1521c8b7..49cb471a 100644
--- a/apps/chrome-extension/.gitignore
+++ b/apps/chrome-extension/.gitignore
@@ -1 +1,2 @@
dist
+*.zip
diff --git a/apps/chrome-extension/package.json b/apps/chrome-extension/package.json
index ad3f071d..4933f8aa 100644
--- a/apps/chrome-extension/package.json
+++ b/apps/chrome-extension/package.json
@@ -8,7 +8,8 @@
"dev": "vite build --watch",
"build": "vite build",
"lint": "tsc --project tsconfig.json --noEmit",
- "clean": "rm -rf dist"
+ "clean": "rm -rf dist",
+ "zip": "pnpm run build && bash zip.sh"
},
"dependencies": {
"jsoncrack-react": "workspace:*",
diff --git a/apps/chrome-extension/public/icons/logo.svg b/apps/chrome-extension/public/icons/logo.svg
new file mode 100644
index 00000000..77e5e088
--- /dev/null
+++ b/apps/chrome-extension/public/icons/logo.svg
@@ -0,0 +1,17 @@
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 600 600"
+ width="1.8em"
+ height="1.8em"
+ version="1.0"
+>
+ <defs>
+ <linearGradient id="td-g" x1="1" y1="0.5" x2="0" y2="0.5">
+ <stop offset="0" stop-color="#FFDE59"/>
+ <stop offset="1" stop-color="#FF66C4"/>
+ </linearGradient>
+ </defs>
+ <path fill="url(#td-g)" d="M87.3 290.8h187a10.8 10.8 0 0 1 10.3 14.2l-62.8 188.6a20.8 20.8 0 0 1-19.8 14.2H15a10.8 10.8 0 0 1-10.3-14.2l62.8-188.6a20.8 20.8 0 0 1 19.8-14.2z"/>
+ <path fill="url(#td-g)" d="M363.1 290.8h187a10.8 10.8 0 0 1 10.3 14.2l-62.8 188.6a20.8 20.8 0 0 1-19.8 14.2H290.8a10.8 10.8 0 0 1-10.3-14.2l62.8-188.6a20.8 20.8 0 0 1 19.8-14.2z"/>
+ <path fill="url(#td-g)" d="M111.7 92.2h401a36.7 36.7 0 0 1 25.7 10.5l50.9 49.9a14.7 14.7 0 0 1 0 21l-50.9 49.9a36.7 36.7 0 0 1-25.7 10.5H111.7a6.1 6.1 0 0 1-4.3-10.5l50.9-49.9a14.7 14.7 0 0 0 0-21l-50.9-49.9a6.1 6.1 0 0 1 4.3-10.5z"/>
+</svg>
diff --git a/apps/chrome-extension/zip.sh b/apps/chrome-extension/zip.sh
new file mode 100755
index 00000000..da1339b6
--- /dev/null
+++ b/apps/chrome-extension/zip.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Define the source directory (dist output)
+SRC_DIR="dist"
+
+# Read version from dist/manifest.json
+VERSION=$(grep '"version":' dist/manifest.json | sed 's/.*"\(.*\)".*/\1/')
+
+# Define the output zip file name
+OUTPUT_ZIP="chrome_extension_v$VERSION.zip"
+
+# Check if the source directory exists
+if [ -d "$SRC_DIR" ]; then
+ # Zip the files in the source directory
+ zip -r "$OUTPUT_ZIP" "$SRC_DIR"
+ echo "Files in $SRC_DIR have been zipped into $OUTPUT_ZIP"
+else
+ echo "Source directory $SRC_DIR does not exist."
+fi