Skip to content

Commit b81c6b2

Browse files
authored
Added Safari Extension Build Script (#23)
1 parent fceb725 commit b81c6b2

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.log
22
dist
33
gitpod.xpi
4-
node_modules
4+
node_modules
5+
Gitpod

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,39 @@ This is the browser extension for Gitpod. It supports Chrome (see [Chrome Web St
77

88
## Build
99

10+
### Chrome & Firefox
11+
12+
```
13+
yarn install && yarn build && yarn package
14+
```
15+
16+
### Safari
17+
18+
#### ⚠️ A machine running macOS and [Xcode 12+](https://developer.apple.com/xcode/) installed is required!
19+
20+
First, run the following to install dependencies and build the web extension:
21+
1022
```
1123
yarn install && yarn build && yarn package
1224
```
1325

26+
Then run the `build:safari` command to build the Safari extension around the web extension:
27+
28+
```
29+
yarn build:safari
30+
```
31+
32+
![Confirm Safari](./docs/safari-confirm.png "Confirm Safari")
33+
34+
Hit `enter` when presented with this screen.
35+
36+
`Xcode` will open the `Gitpod.xcodeproj` automatically if it's installed.
37+
1438
## Test
1539

1640
[Build](#build) the extension and
1741
* unzip `gitpod.xpi` and load it as [“unpackaged extension” (Chrome)](https://developer.chrome.com/extensions/getstarted) or
18-
* load `gitpod.xpi` as [“temporary add-on” (Firefox)](https://blog.mozilla.org/addons/2015/12/23/loading-temporary-add-ons/).
42+
* load `gitpod.xpi` as [“temporary add-on” (Firefox)](https://blog.mozilla.org/addons/2015/12/23/loading-temporary-add-ons/) or
43+
* open `Gitpod/Gitpod.xcodeproj` and run the project with `cmd` + `r`. ⚠️ _Safari must have [**Allow Unsigned Extensions**](https://developer.apple.com/documentation/safariservices/safari_app_extensions/building_a_safari_app_extension) enabled._
1944

2045
The extension is active until the next restart of your browser.

docs/safari-confirm.png

53.3 KB
Loading

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"main": "src/gitpodify.js",
88
"scripts": {
99
"build": "yarn clean && npx tsc && yarn webpack",
10+
"build:safari": " xcrun safari-web-extension-converter . --app-name Gitpod --bundle-identifier io.gitpod.Gitpod",
1011
"package": "yarn clean:package && zip -rD --exclude='src/*.ts' gitpod.xpi dist/bundles icons src manifest.json",
1112
"clean": "rimraf dist && yarn clean:package",
1213
"clean:package": "rimraf gitpod.xpi",

0 commit comments

Comments
 (0)