mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01: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
|
||||
build
|
||||
chrome-extension
|
||||
bruno.zip
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
@ -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
|
||||
|
@ -11,5 +11,8 @@
|
||||
"devDependencies": {
|
||||
"jest": "^29.2.0",
|
||||
"randomstring": "^1.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build-chrome-extension": "./scripts/create-chrome-extension.sh"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"build": "next build && next export",
|
||||
"start": "next start",
|
||||
"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…
Reference in New Issue
Block a user