Set up macOS example

This commit is contained in:
Simon 2018-12-26 17:27:51 +08:00
parent 3310cb4aa4
commit edbd67a453
4 changed files with 22 additions and 5 deletions

View File

@ -0,0 +1,8 @@
{
"object": {
"pins": [
]
},
"version": 1
}

View File

@ -12,7 +12,7 @@ let package = Package(
targets: ["ImagesExample-macOS"]),
],
dependencies: [
.package(url: "../../PlaceholderKit", from: "0.0.3")
.package(path: "../../.")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@ -22,6 +22,6 @@ let package = Package(
dependencies: ["PlaceholderKit"]),
.testTarget(
name: "ImagesExample-macOSTests",
dependencies: ["ImagesExample-macOS", "PlaceholderKit"]),
dependencies: ["ImagesExample-macOS"]),
]
)

View File

@ -1,3 +0,0 @@
struct ImagesExample_macOS {
var text = "Hello, World!"
}

View File

@ -0,0 +1,12 @@
//
// main.swift
// ImagesExample-macOS
//
// Created by Simon Lee on 12/26/18.
//
import PlaceholderKit
import AppKit
let image = PlaceholderBuilder().coloredBackground(color: .red, size: CGSize(width: 100, height: 100))
print(image)