Skip to content

Commit

Permalink
Merge pull request #4 from IgorMuzyka/master
Browse files Browse the repository at this point in the history
Now custom configuration types are supported
  • Loading branch information
orta authored Mar 24, 2019
2 parents 972f80b + 242ae21 commit 9c8b95d
Show file tree
Hide file tree
Showing 23 changed files with 383 additions and 1,099 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DerivedData/
*.perspectivev3
!default.perspectivev3
xcuserdata/
/*.xcodeproj

## Other
*.moved-aside
Expand Down
32 changes: 16 additions & 16 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ import PackageDescription
let package = Package(
name: "PackageConfig",
products: [
.library(name: "PackageConfig", type: .dynamic, targets: ["PackageConfig"]),
.executable(name: "package-config-example", targets: ["Example"])
.library(name: "PackageConfig", targets: ["PackageConfig"]),
.executable(name: "package-config", targets: ["PackageConfigExecutable"]),

.library(name: "ExampleConfig", type: .dynamic, targets: ["ExampleConfig"]),
.executable(name: "package-config-example", targets: ["Example"]),
],
dependencies: [
],
dependencies: [],
targets: [
// The lib
.target(name: "PackageConfig", dependencies: []),
.target(name: "PackageConfig", dependencies: []),
.target(name: "PackageConfigExecutable", dependencies: []),

// The app I use to verify it all works
.target(name: "Example", dependencies: ["PackageConfig"]),
// Not used
.testTarget(name: "PackageConfigTests", dependencies: ["PackageConfig"]),
.target(name: "ExampleConfig", dependencies: ["PackageConfig"]),
.target(name: "Example", dependencies: ["PackageConfig", "ExampleConfig"]),

// .target(name: "PackageConfigs", dependencies: ["ExampleConfig"]),
]
)

#if canImport(PackageConfig)
import PackageConfig
#if canImport(ExampleConfig)
import ExampleConfig

let config = PackageConfig([
"danger" : ["disable"],
"linter": ["rules": ["allowSomething"]]
])
ExampleConfig(value: "example value").write()
#endif

25 changes: 0 additions & 25 deletions PackageConfig.xcodeproj/PackageConfigTests_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions PackageConfig.xcodeproj/PackageConfig_Info.plist

This file was deleted.

Loading

0 comments on commit 9c8b95d

Please sign in to comment.