Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ xcuserdata/
/*.gcno

## Test output
test_output
test_output

#$ Swift Package Manager
.build/
32 changes: 32 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// swift-tools-version:5.1
//
// Package.swift
// Visually
//
// Created by Tomasz Lewandowski on 22/01/2020.
//
import PackageDescription

let package = Package(
name: "Visually",
platforms: [
.macOS(.v10_11),
.iOS(.v8),
.tvOS(.v9)
],
products: [
.library(
name: "Visually",
targets: ["Visually"])
],
targets: [
.target(
name: "Visually",
dependencies: [],
path: "Visually"),
.testTarget(
name: "VisuallyTests",
dependencies: ["Visually"],
path: "VisuallyTests")
]
)
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Cocoapods](https://img.shields.io/cocoapods/v/Visually.svg?style=flat)](https://cocoapods.org/pods/Visually)
[![Platform](https://img.shields.io/cocoapods/p/Visually.svg?style=flat)](https://cocoapods.org/pods/Visually)
[![Build Status](https://travis-ci.org/lukkas/Visually.svg)](https://travis-ci.org/codecov/example-swift)
[![codecov.io](https://codecov.io/gh/lukkas/Visually/branch/master/graphs/badge.svg)](https://codecov.io/gh/codecov/example-swift/branch/master)
[![codecov.io](https://codecov.io/gh/lukkas/Visually/branch/master/graphs/badge.svg)](https://codecov.io/gh/lukkas/Visually)
[![License](https://img.shields.io/cocoapods/l/Visually.svg?style=flat)](https://cocoapods.org/pods/Visually)

# Visually
Expand All @@ -29,6 +29,35 @@ For more details see [CocoaPods website](http://cocoapods.org)
Add `github "lukkas/Visually"` to your Cartfile, run `carthage update` and drag built frameworks to your Xcode project.
For more details see [Carthage git repository](https://github.com/Carthage/Carthage)

### Swift Package Manager

To install Visually using **Swift Package Manager** go through following steps:

1. Add following package dependency in you **Package.swift** ``` .package(url: "https://github.com/lukkas/Visually.git", from: "2.0.0") ```
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd just leave point 1. (and of course remove the number) and maybe add some context here, like so

dependencies: [
         .package(url: "https://github.com/lukkas/Visually.git", from: "2.0.0")
]

I'd leave out point 2 and the example. It is just information that you can find anywhere and I wouldn't like to focus on this in README too much

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "from" must be specified for a package dependency, I suggest changing "2.0.0" to -> "VERSION_NUMBER_HERE"
what do you think?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the entire second point of the instruction, not the version number. I don't want to get too specific of how to use SPM here. I think that up to 5 lines, including snippets is enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'm onto it :)

2. Add following target dependency in your **Package.swift** ``` dependencies: ["Visually"]) ```

For instance this is how it might look like:
```swift
import PackageDescription

let package = Package(
name: "YourExecutable",
products: [
.executable(
name: "YourExecutable",
targets: ["YourExecutable"])
],
dependencies: [
.package(url: "https://github.com/lukkas/Visually.git", from: "2.0.0")
],
targets: [
.target(
name: "YourExecutable",
dependencies: ["Visually"])
]
)
```

## Operators and rules

Visually defines 15 custom operators and adds subscripts to UIView/NSView in order to achieve its objectives. These operators can be divided into 5 groups:
Expand Down