feat: wip packaging chrome extension

This commit is contained in:
Anoop M D 2022-10-16 20:01:23 +05:30
parent abc00b810f
commit 46949e48ba
6 changed files with 36 additions and 1 deletions

2
.gitignore vendored
View File

@ -10,6 +10,8 @@ coverage
# production
build
chrome-extension
bruno.zip
# misc
.DS_Store

View File

@ -8,6 +8,9 @@ npm run dev --workspace=packages/bruno-app
# run electron app
npm run dev --workspace=packages/bruno-electron
# build next app
npm run build --workspace=packages/bruno-app
```
# testing

View File

@ -11,5 +11,8 @@
"devDependencies": {
"jest": "^29.2.0",
"randomstring": "^1.2.2"
},
"scripts": {
"build-chrome-extension": "./scripts/create-chrome-extension.sh"
}
}

View File

@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && next export",
"start": "next start",
"lint": "next lint"
},

View File

@ -0,0 +1,5 @@
{
"manifest_version": 2,
"name": "Bruno API Client",
"short_name": "Bruno"
}

View File

@ -0,0 +1,22 @@
#!/bin/bash
# Remove any chrome-extension directory
rm -rf chrome-extension
# Remove any bruno.zip files
rm bruno.zip
# Create a new chrome-extension directory
mkdir chrome-extension
# Copy build
cp -r packages/bruno-app/out/* chrome-extension
# Copy the chrome extension files
cp -r scripts/chrome-extension-files/* chrome-extension
# Remove sourcemaps
find chrome-extension -name '*.map' -type f -delete
# Compress the chrome-extension directory into a zip file
zip -r bruno.zip chrome-extension