Skip to content

Commit bfce473

Browse files
authored
ci: improve example build process (#1115)
1 parent 1bafccc commit bfce473

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dist
77
.gradle/
88
build/
99
coverage/
10+
*.tgz
1011

1112
# Coverage
1213
coverage/

example/IonicCapOneSignal/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Setup
22

3-
Link the root package e.g. `bun link`
4-
First install the packages e.g. `bun i`
5-
6-
You may need to relink package incase the root has new changes.
7-
So just run `bun link` again.
3+
First install the packages e.g. `bun i`.
84

95
## Android
106

example/IonicCapOneSignal/bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/IonicCapOneSignal/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build:root": "cd ../.. && bun run build",
98
"update:pod": "cd ios/App && pod update OneSignalXCFramework",
10-
"build:example": "tsc && vite build",
11-
"build": "bun run build:root && bun run build:example",
9+
"build": "scripts/build.sh",
1210
"ionic:build": "bun run build",
1311
"preview": "vite preview"
1412
},
@@ -21,7 +19,7 @@
2119
"@ionic/react-router": "^8.7.7",
2220
"@types/react-router": "^5.1.20",
2321
"@types/react-router-dom": "^5.3.3",
24-
"onesignal-cordova-plugin": "link:onesignal-cordova-plugin",
22+
"onesignal-cordova-plugin": "file:../../onesignal-cordova-plugin.tgz",
2523
"react": "^18.2.0",
2624
"react-dom": "^18.2.0",
2725
"react-router": "^5.3.4",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
cd ../../
3+
bun run build
4+
5+
# Pack
6+
bun pm pack
7+
mv onesignal-cordova-plugin-*.tgz onesignal-cordova-plugin.tgz
8+
9+
# Install/update the plugin in the example app
10+
cd example/IonicCapOneSignal
11+
bun i
12+
13+
# Build example
14+
tsc && vite build
15+

0 commit comments

Comments
 (0)