Skip to content

Commit ae1d472

Browse files
authored
chore: move Package.swift to root directory (#73)
1 parent 281d64f commit ae1d472

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
# node files
12
node_modules
3+
4+
# iOS files
5+
Package.resolved
6+
.build
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ let package = Package(
2121
.product(name: "Cordova", package: "capacitor-swift-pm"),
2222
.product(name: "IONGeolocationLib", package: "ion-ios-geolocation")
2323
],
24-
path: "ios/Sources/GeolocationPlugin"),
24+
path: "packages/capacitor-plugin/ios/Sources/GeolocationPlugin"),
2525
.testTarget(
2626
name: "GeolocationPluginTests",
2727
dependencies: ["GeolocationPlugin"],
28-
path: "ios/Tests/GeolocationTests")
28+
path: "packages/capacitor-plugin/ios/Tests/GeolocationTests")
2929
]
3030
)

packages/capacitor-plugin/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
],
3232
"scripts": {
3333
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
34-
"verify:ios": "xcodebuild -scheme CapacitorGeolocation -destination generic/platform=iOS",
34+
"verify:ios": "cd ../.. && xcodebuild -scheme CapacitorGeolocation -destination generic/platform=iOS",
3535
"verify:android": "cd android && ./gradlew clean build test && cd ..",
3636
"verify:web": "npm run build",
3737
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -44,7 +44,9 @@
4444
"clean": "rimraf ./dist",
4545
"watch": "tsc --watch",
4646
"prepublishOnly": "npm run build",
47-
"publish:cocoapod": "pod trunk push ./CapacitorGeolocation.podspec --allow-warnings"
47+
"publish:cocoapod": "pod trunk push ./CapacitorGeolocation.podspec --allow-warnings",
48+
"prepack": "cp ../../Package.swift Package.swift && node -e 'const fs=require(\"fs\");let s=fs.readFileSync(\"Package.swift\",\"utf8\").split(\"packages/capacitor-plugin/\").join(\"\");fs.writeFileSync(\"Package.swift\",s);'",
49+
"postpack": "rm -f Package.swift"
4850
},
4951
"dependencies": {
5052
"@capacitor/synapse": "^1.0.4"

0 commit comments

Comments
 (0)