Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
helje5 committed Jul 4, 2019
2 parents dcd58e8 + ed6c0fe commit 647a07e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
20 changes: 18 additions & 2 deletions Package.swift
Expand Up @@ -2,29 +2,45 @@

import PackageDescription

#if canImport(Combine)
let extraPackages : [ PackageDescription.Package.Dependency ] = []
let extraDependencies : [ Target.Dependency ] = []
#else
let extraPackages : [ PackageDescription.Package.Dependency ] = [
.package(url: "https://github.com/broadwaylamb/OpenCombine.git",
from: "0.1.0")
]
let extraDependencies : [ Target.Dependency ] = [ "OpenCombine" ]
#endif

let package = Package(

name: "SwiftWebUI",

platforms: [
.macOS(.v10_15), .iOS(.v13)
],

products: [
.library (name: "SwiftWebUI", targets: [ "SwiftWebUI" ]),
.executable(name: "HolyCow", targets: [ "HolyCow" ])
],

dependencies: [
.package(url: "https://github.com/apple/swift-nio.git",
from: "2.3.0"),
.package(url: "https://github.com/SwiftWebResources/SemanticUI-Swift.git",
from: "2.3.4"),
.package(url: "https://github.com/wickwirew/Runtime.git",
from: "2.1.0")
],
] + extraPackages,

targets: [
.target(name: "SwiftWebUI",
dependencies: [
"NIO", "NIOHTTP1", "NIOConcurrencyHelpers",
"Runtime", "SemanticUI"
]),
] + extraDependencies),
.target(name: "HolyCow", dependencies: [ "SwiftWebUI" ])
]
)
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@

![Swift5.1](https://img.shields.io/badge/swift-5.1-blue.svg)
![macOS](https://img.shields.io/badge/os-macOS-green.svg?style=flat)
![tuxOS](https://img.shields.io/badge/os-tuxOS-orange.svg?style=flat)
![tuxOS](https://img.shields.io/badge/os-tuxOS-green.svg?style=flat)
![Travis](https://api.travis-ci.org/SwiftWebUI/SwiftWebUI.svg?branch=master&style=flat)

More details can be found on the related blog post at the
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftWebUI/Misc/NoCombine.swift
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 Helge Heß. All rights reserved.
//

#if !canImport(Combine)
#if !canImport(Combine) && !canImport(OpenCombine)

// TODO: This needs more work. Just the basics to get synchronous event emitters
// working w/o Combine.
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftWebUI/Properties/BindableObject.swift
Expand Up @@ -9,6 +9,8 @@
// FIXME: Combine requires 10.15, maybe provide a simple alternative
#if canImport(Combine)
import Combine
#elseif canImport(OpenCombine)
import OpenCombine
#endif

public protocol BindableObject: AnyObject, DynamicViewProperty, Identifiable {
Expand Down
3 changes: 2 additions & 1 deletion Sources/SwiftWebUI/Properties/EnvironmentObject.swift
Expand Up @@ -8,7 +8,8 @@

#if canImport(Combine)
import Combine
// Uses `.sink` and `AnyCancellable` on the BindableObject
#elseif canImport(OpenCombine)
import OpenCombine
#endif

@propertyWrapper
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftWebUI/Properties/ObjectBinding.swift
Expand Up @@ -8,6 +8,8 @@

#if canImport(Combine)
import Combine
#elseif canImport(OpenCombine)
import OpenCombine
#endif

@propertyWrapper
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftWebUI/Views/Navigation/NavigationContext.swift
Expand Up @@ -8,6 +8,8 @@

#if canImport(Combine)
import Combine
#elseif canImport(OpenCombine)
import OpenCombine
#endif

final class NavigationContext: BindableObject {
Expand Down

0 comments on commit 647a07e

Please sign in to comment.