Skip to content

Commit 7334e2e

Browse files
authored
chore: move Package.swift to root directory (#66)
* chore: move Package.swift to root directory * chore: add prepack/postpack to include Package.swift
1 parent 4e104c1 commit 7334e2e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.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: "IONFilesystemLib", package: "ion-ios-filesystem")
2323
],
24-
path: "ios/Sources/FilesystemPlugin"),
24+
path: "packages/capacitor-plugin/ios/Sources/FilesystemPlugin"),
2525
.testTarget(
2626
name: "FilesystemPluginTests",
2727
dependencies: ["FilesystemPlugin"],
28-
path: "ios/Tests/FilesystemPluginTests")
28+
path: "packages/capacitor-plugin/ios/Tests/FilesystemPluginTests")
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 CapacitorFilesystem -destination generic/platform=iOS",
34+
"verify:ios": "cd ../.. && xcodebuild -scheme CapacitorFilesystem -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 ./CapacitorFilesystem.podspec --allow-warnings"
47+
"publish:cocoapod": "pod trunk push ./CapacitorFilesystem.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)