Fixed project reference, more test code
This commit is contained in:
parent
fd8e1fc030
commit
bc6747b1e4
|
@ -14,7 +14,6 @@
|
||||||
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
|
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
|
||||||
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
|
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
|
||||||
B317BD2F1AD18A7F514CA335 /* Pods_Gluon_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1B4A8D80770145FDAFEAE64 /* Pods_Gluon_Tests.framework */; };
|
B317BD2F1AD18A7F514CA335 /* Pods_Gluon_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1B4A8D80770145FDAFEAE64 /* Pods_Gluon_Tests.framework */; };
|
||||||
D15C8A93214D2A91002DBA91 /* Gluon.swift in Sources */ = {isa = PBXBuildFile; fileRef = D15C8A92214D2A91002DBA91 /* Gluon.swift */; };
|
|
||||||
E5226F2FEFBADF8F2E0F0846 /* Pods_Gluon_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F369EAC5434B4E52EB412B5 /* Pods_Gluon_Example.framework */; };
|
E5226F2FEFBADF8F2E0F0846 /* Pods_Gluon_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F369EAC5434B4E52EB412B5 /* Pods_Gluon_Example.framework */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@
|
||||||
B56CFE53515A8A8E073D5254 /* Pods-Gluon_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Tests/Pods-Gluon_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
B56CFE53515A8A8E073D5254 /* Pods-Gluon_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Tests/Pods-Gluon_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
C1B4A8D80770145FDAFEAE64 /* Pods_Gluon_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Gluon_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
C1B4A8D80770145FDAFEAE64 /* Pods_Gluon_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Gluon_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
C6DA99382B6892EAB361742F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
|
C6DA99382B6892EAB361742F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
|
||||||
D15C8A92214D2A91002DBA91 /* Gluon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gluon.swift; sourceTree = "<group>"; };
|
|
||||||
DB9D7B418828F169C47C3FBE /* Pods-Gluon_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Tests/Pods-Gluon_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
DB9D7B418828F169C47C3FBE /* Pods-Gluon_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Tests/Pods-Gluon_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
E7F808D1B3715FF294877289 /* Pods-Gluon_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Example/Pods-Gluon_Example.release.xcconfig"; sourceTree = "<group>"; };
|
E7F808D1B3715FF294877289 /* Pods-Gluon_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Gluon_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Gluon_Example/Pods-Gluon_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
@ -101,7 +99,6 @@
|
||||||
607FACDC1AFB9204008FA782 /* Images.xcassets */,
|
607FACDC1AFB9204008FA782 /* Images.xcassets */,
|
||||||
607FACDE1AFB9204008FA782 /* LaunchScreen.xib */,
|
607FACDE1AFB9204008FA782 /* LaunchScreen.xib */,
|
||||||
607FACD31AFB9204008FA782 /* Supporting Files */,
|
607FACD31AFB9204008FA782 /* Supporting Files */,
|
||||||
D15C8A92214D2A91002DBA91 /* Gluon.swift */,
|
|
||||||
);
|
);
|
||||||
name = "Example for Gluon";
|
name = "Example for Gluon";
|
||||||
path = Gluon;
|
path = Gluon;
|
||||||
|
@ -354,7 +351,6 @@
|
||||||
files = (
|
files = (
|
||||||
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
|
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
|
||||||
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
|
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
|
||||||
D15C8A93214D2A91002DBA91 /* Gluon.swift in Sources */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,13 +11,8 @@ import UIKit
|
||||||
protocol GluonProp: Hashable {
|
protocol GluonProp: Hashable {
|
||||||
}
|
}
|
||||||
|
|
||||||
//class Component<P: GluonProp> {
|
class Component<P: GluonProp> {
|
||||||
// var props: Set<P> = []
|
var props: Set<P> = []
|
||||||
//}
|
|
||||||
|
|
||||||
protocol Component {
|
|
||||||
associatedtype P: GluonProp
|
|
||||||
var props: Set<P> { get }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// protocol Gluon: Component {
|
// protocol Gluon: Component {
|
||||||
|
@ -49,23 +44,24 @@ where P: GluonProp {
|
||||||
extension String: AnyGluonNode {
|
extension String: AnyGluonNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
final class Button: Component {
|
enum ButtonProp: GluonProp {
|
||||||
enum Prop: GluonProp {
|
case backgroundColor(UIColor)
|
||||||
case backgroundColor(UIColor)
|
case textColor(UIColor)
|
||||||
case textColor(UIColor)
|
case disabled(Bool)
|
||||||
case disabled(Bool)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// enum TestProps: GluonProp {
|
final class Button: Component<ButtonProp> {
|
||||||
// case disabled(Bool)
|
}
|
||||||
// }
|
|
||||||
//
|
enum TestProps: GluonProp {
|
||||||
// typealias Stateless<P> = (P) -> GluonNode<P> where P: GluonProp
|
case disabled(Bool)
|
||||||
//
|
}
|
||||||
// let stateless = { (p: TestProps) in
|
|
||||||
// return Button.node()
|
typealias Stateless<P1> = (P) -> GluonNode<P> where P: GluonProp
|
||||||
// }
|
|
||||||
//
|
let stateless = { (p: TestProps) in
|
||||||
// let f: Stateless<TestProps> = stateless
|
return Button.node()
|
||||||
//
|
}
|
||||||
|
|
||||||
|
let f: Stateless<TestProps> = stateless
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue