mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-20 19:58:10 +02:00
feat: wip packaging chrome extension
This commit is contained in:
parent
abc00b810f
commit
46949e48ba
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,6 +10,8 @@ coverage
|
|||||||
|
|
||||||
# production
|
# production
|
||||||
build
|
build
|
||||||
|
chrome-extension
|
||||||
|
bruno.zip
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -8,6 +8,9 @@ npm run dev --workspace=packages/bruno-app
|
|||||||
|
|
||||||
# run electron app
|
# run electron app
|
||||||
npm run dev --workspace=packages/bruno-electron
|
npm run dev --workspace=packages/bruno-electron
|
||||||
|
|
||||||
|
# build next app
|
||||||
|
npm run build --workspace=packages/bruno-app
|
||||||
```
|
```
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
|
@ -11,5 +11,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jest": "^29.2.0",
|
"jest": "^29.2.0",
|
||||||
"randomstring": "^1.2.2"
|
"randomstring": "^1.2.2"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build-chrome-extension": "./scripts/create-chrome-extension.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build && next export",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
|
5
scripts/chrome-extension-files/manifest.json
Normal file
5
scripts/chrome-extension-files/manifest.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 2,
|
||||||
|
"name": "Bruno API Client",
|
||||||
|
"short_name": "Bruno"
|
||||||
|
}
|
22
scripts/create-chrome-extension.sh
Executable file
22
scripts/create-chrome-extension.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user