feature: support swift package manager #965
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,7 @@
|
|||||||
.DS_STORE
|
.DS_STORE
|
||||||
|
|
||||||
|
*.xcodeproj
|
||||||
|
|
||||||
/buck-cache/
|
/buck-cache/
|
||||||
/buck-out/
|
/buck-out/
|
||||||
/.buckconfig.local
|
/.buckconfig.local
|
||||||
@@ -7,6 +9,8 @@
|
|||||||
/gentest/test.html
|
/gentest/test.html
|
||||||
.buckversion
|
.buckversion
|
||||||
|
|
||||||
|
.build/
|
||||||
|
|
||||||
# Jekyll
|
# Jekyll
|
||||||
/.sass-cache/
|
/.sass-cache/
|
||||||
/_site/
|
/_site/
|
||||||
|
38
Package.swift
Normal file
38
Package.swift
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
// swift-tools-version:5.0
|
||||||
|
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "YogaKit",
|
||||||
|
platforms: [
|
||||||
|
.macOS(.v10_10),
|
||||||
|
.iOS(.v8),
|
||||||
|
.tvOS(.v9),
|
||||||
|
.watchOS(.v2)
|
||||||
|
],
|
||||||
|
products: [
|
||||||
|
.library(
|
||||||
|
name: "YogaKit",
|
||||||
|
//type: .dynamic,
|
||||||
|
targets: ["YogaKit"]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
dependencies: [],
|
||||||
|
targets: [
|
||||||
|
.target(
|
||||||
|
name: "YogaKit",
|
||||||
|
path: "yoga",
|
||||||
|
//exclude: [],
|
||||||
|
sources: ["./"],
|
||||||
|
publicHeadersPath: "include",
|
||||||
|
cSettings: [
|
||||||
|
.headerSearchPath("./")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
swiftLanguageVersions: [
|
||||||
|
.version("5")
|
||||||
|
],
|
||||||
|
cLanguageStandard: .gnu11,
|
||||||
|
cxxLanguageStandard: .gnucxx14
|
||||||
|
)
|
26
Playground.playground/Contents.swift
Normal file
26
Playground.playground/Contents.swift
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//: A UIKit based Playground for presenting user interface
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
import PlaygroundSupport
|
||||||
|
import YogaKit
|
||||||
|
|
||||||
|
let globalConfig: YGConfigRef = YGConfigNew()
|
||||||
|
var node:YGNodeRef = YGNodeNewWithConfig(globalConfig)
|
||||||
|
|
||||||
|
|
||||||
|
class MyViewController : UIViewController {
|
||||||
|
override func loadView() {
|
||||||
|
let view = UIView()
|
||||||
|
view.backgroundColor = .white
|
||||||
|
|
||||||
|
let label = UILabel()
|
||||||
|
label.frame = CGRect(x: 150, y: 200, width: 200, height: 20)
|
||||||
|
label.text = "Hello World!"
|
||||||
|
label.textColor = .black
|
||||||
|
|
||||||
|
view.addSubview(label)
|
||||||
|
self.view = view
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Present the view controller in the Live View window
|
||||||
|
PlaygroundPage.current.liveView = MyViewController()
|
4
Playground.playground/contents.xcplayground
Normal file
4
Playground.playground/contents.xcplayground
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<playground version='5.0' target-platform='ios' executeOnSourceChanges='true'>
|
||||||
|
<timeline fileName='timeline.xctimeline'/>
|
||||||
|
</playground>
|
@@ -10,7 +10,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <yoga/YGEnums.h>
|
#include "../YGEnums.h"
|
||||||
|
|
||||||
struct YGConfig;
|
struct YGConfig;
|
||||||
struct YGNode;
|
struct YGNode;
|
||||||
|
15
yoga/include/public-header.h
Normal file
15
yoga/include/public-header.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
@import Foundation;
|
||||||
|
|
||||||
|
#include "../Yoga.h"
|
||||||
|
#include "../YGMacros.h"
|
||||||
|
#include "../YGValue.h"
|
||||||
|
#include "../YGEnums.h"
|
Reference in New Issue
Block a user