Skip to content

Commit

Permalink
Merge pull request #17 from banjun/spm
Browse files Browse the repository at this point in the history
Support Swift Package Manager
  • Loading branch information
banjun authored Dec 28, 2019
2 parents 0b9e254 + a9e98d6 commit ad450da
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/NorthLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
// Created by BAN Jun on 5/9/15.
// Copyright (c) 2015 banjun. All rights reserved.
//
import CoreGraphics
#if os(iOS)
import class UIKit.UIView
import UIKit
typealias View = UIView
typealias Size = CGSize
typealias LayoutPriority = UILayoutPriority
Expand All @@ -25,7 +26,7 @@
}

#else
import class AppKit.NSView
import AppKit
typealias View = NSView
typealias Size = NSSize
typealias LayoutPriority = NSLayoutConstraint.Priority
Expand Down
6 changes: 6 additions & 0 deletions Classes/VFL.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import Foundation
import CoreGraphics
#if os(iOS)
import UIKit
#else
import AppKit
#endif

extension VFL {
/// decompose visual format into both side of edge connections and a middle remainder format string
Expand Down
1 change: 1 addition & 0 deletions Classes/VFLSyntax.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import CoreGraphics
import FootlessParser

// AST for VisualFormatLanguage with an extended format,
Expand Down
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "FootlessParser",
"repositoryURL": "https://github.com/kareman/FootlessParser",
"state": {
"branch": null,
"revision": "11c7a366720a2cc62d13ee69c8bdb8372bb3bb2b",
"version": "0.5.2"
}
}
]
},
"version": 1
}
10 changes: 10 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "NorthLayout",
platforms: [.macOS(.v10_11), .iOS(.v9)],
products: [.library(name: "NorthLayout", targets: ["NorthLayout"])],
dependencies: [.package(url: "https://github.com/kareman/FootlessParser", .upToNextMajor(from: "0.4.0"))],
targets: [.target(name: "NorthLayout", dependencies: ["FootlessParser"], path: "Classes")]
)

0 comments on commit ad450da

Please sign in to comment.