Permalink
Browse files

Add Sources & Playground

1 parent 50b89c4 commit b0cd0e7c584bfcc71af9e7f6b5e4a904d87801e4 @inamiy committed Jan 4, 2017
Showing with 2,376 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +35 −0 .swiftlint.yml
  4. BIN Assets/JustifyContent.png
  5. +6 −0 Configurations/Base.xcconfig
  6. +3 −0 Configurations/Debug.xcconfig
  7. +3 −0 Configurations/Release.xcconfig
  8. +28 −0 Configurations/UniversalFramework_Base.xcconfig
  9. +32 −0 Configurations/UniversalFramework_Framework.xcconfig
  10. +18 −0 Configurations/UniversalFramework_Test.xcconfig
  11. +1 −0 Externals/yoga
  12. +521 −0 Flexbox.xcodeproj/project.pbxproj
  13. +7 −0 Flexbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  14. +99 −0 Flexbox.xcodeproj/xcshareddata/xcschemes/Flexbox.xcscheme
  15. +10 −0 Flexbox.xcworkspace/contents.xcworkspacedata
  16. +54 −0 FlexboxPlayground.playground/Pages/AlignContent.xcplaygroundpage/Contents.swift
  17. +46 −0 FlexboxPlayground.playground/Pages/AlignItems.xcplaygroundpage/Contents.swift
  18. +91 −0 FlexboxPlayground.playground/Pages/AlignSelf.xcplaygroundpage/Contents.swift
  19. +27 −0 FlexboxPlayground.playground/Pages/Direction.xcplaygroundpage/Contents.swift
  20. +49 −0 FlexboxPlayground.playground/Pages/Edges.xcplaygroundpage/Contents.swift
  21. +110 −0 FlexboxPlayground.playground/Pages/Example.xcplaygroundpage/Contents.swift
  22. +40 −0 FlexboxPlayground.playground/Pages/FlexBasis.xcplaygroundpage/Contents.swift
  23. +25 −0 FlexboxPlayground.playground/Pages/FlexDirection.xcplaygroundpage/Contents.swift
  24. +66 −0 FlexboxPlayground.playground/Pages/FlexGrow.xcplaygroundpage/Contents.swift
  25. +65 −0 FlexboxPlayground.playground/Pages/FlexShrink.xcplaygroundpage/Contents.swift
  26. +27 −0 FlexboxPlayground.playground/Pages/FlexWrap.xcplaygroundpage/Contents.swift
  27. +26 −0 FlexboxPlayground.playground/Pages/JustifyContent.xcplaygroundpage/Contents.swift
  28. +30 −0 FlexboxPlayground.playground/Pages/Measure.xcplaygroundpage/Contents.swift
  29. +30 −0 FlexboxPlayground.playground/Pages/Overflow.xcplaygroundpage/Contents.swift
  30. +29 −0 FlexboxPlayground.playground/Pages/PositionType.xcplaygroundpage/Contents.swift
  31. +26 −0 FlexboxPlayground.playground/Sources/Config.swift
  32. +21 −0 FlexboxPlayground.playground/Sources/Example.swift
  33. +36 −0 FlexboxPlayground.playground/Sources/Screenshot.swift
  34. +75 −0 FlexboxPlayground.playground/Sources/Setup.swift
  35. +20 −0 FlexboxPlayground.playground/contents.xcplayground
  36. +50 −1 README.md
  37. +40 −0 Sources/Edges.swift
  38. +10 −0 Sources/Flexbox.h
  39. +24 −0 Sources/Info.plist
  40. +48 −0 Sources/Layout+View.swift
  41. +47 −0 Sources/Layout.swift
  42. +245 −0 Sources/Node.swift
  43. +25 −0 Sources/NodeImpl.h
  44. +85 −0 Sources/NodeImpl.m
  45. +119 −0 Sources/Style.swift
  46. +22 −0 Tests/Info.plist
View
@@ -18,8 +18,10 @@ DerivedData/
xcuserdata/
## Other
+*.xccheckout
*.moved-aside
*.xcuserstate
+*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
View
@@ -0,0 +1,3 @@
+[submodule "Externals/yoga"]
+ path = Externals/yoga
+ url = https://github.com/facebook/yoga.git
View
@@ -0,0 +1,35 @@
+#
+# NOTE:
+# To fix `trailing_whitespace` error,
+# go to Xcode Preferences -> Text Editing -> turn on both "Automatically trim trailing whitespace" and "Including whitespace-only lines".
+#
+
+disabled_rules:
+ - line_length
+ - function_body_length
+ - type_body_length
+ - file_length
+ - cyclomatic_complexity
+
+ - force_cast
+
+ - opening_brace # prefer Allman-Style
+ - closing_brace # allow `}\n)`
+ - statement_position # allow `if {}\nelse {}`
+ - type_name # allow "_" prefix name
+ - variable_name # allow "_" prefix name
+ - todo
+ - valid_docs
+
+opt_in_rules:
+ - empty_count # local variable name `count` is frequently used
+
+included:
+ - Sources
+ - Tests
+
+excluded:
+ - Carthage
+ - Packages
+
+reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,6 @@
+MACOSX_DEPLOYMENT_TARGET = 10.9
+IPHONEOS_DEPLOYMENT_TARGET = 8.0
+//WATCHOS_DEPLOYMENT_TARGET = 2.0
+TVOS_DEPLOYMENT_TARGET = 9.0
+
+SWIFT_VERSION = 3.0.1
@@ -0,0 +1,3 @@
+#include "Base.xcconfig"
+
+SWIFT_OPTIMIZATION_LEVEL = -Onone;
@@ -0,0 +1,3 @@
+#include "Base.xcconfig"
+
+SWIFT_OPTIMIZATION_LEVEL = -Owholemodule;
@@ -0,0 +1,28 @@
+//
+// Put this file alongside to the other both, as it contains what
+// both have in common. Don't rename this file.
+//
+// Copyright (c) 2014-2015 Marius Rackwitz. All rights reserved.
+//
+
+// From https://github.com/mrackwitz/xcconfigs without watchOS support.
+
+// Make it universal
+//SUPPORTED_PLATFORMS = macosx iphonesimulator iphoneos watchos watchsimulator appletvos appletvsimulator
+SUPPORTED_PLATFORMS = macosx iphonesimulator iphoneos appletvos appletvsimulator
+VALID_ARCHS[sdk=macosx*] = i386 x86_64
+VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s
+VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64
+//VALID_ARCHS[sdk=watchos*] = armv7k
+//VALID_ARCHS[sdk=watchsimulator*] = i386
+VALID_ARCHS[sdk=appletv*] = arm64
+VALID_ARCHS[sdk=appletvsimulator*] = x86_64
+
+// Dynamic linking uses different default copy paths
+LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+//LD_RUNPATH_SEARCH_PATHS[sdk=watchos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+//LD_RUNPATH_SEARCH_PATHS[sdk=watchsimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
@@ -0,0 +1,32 @@
+//
+// Inherit from this config in your framework target.
+//
+// Copyright (c) 2014-2015 Marius Rackwitz. All rights reserved.
+//
+
+#include "UniversalFramework_Base.xcconfig"
+
+// OSX-specific default settings
+FRAMEWORK_VERSION[sdk=macosx*] = A
+COMBINE_HIDPI_IMAGES[sdk=macosx*] = YES
+
+// iOS-specific default settings
+CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
+TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*] = 1,2
+TARGETED_DEVICE_FAMILY[sdk=iphone*] = 1,2
+
+// TV-specific default settings
+TARGETED_DEVICE_FAMILY[sdk=appletvsimulator*] = 3
+TARGETED_DEVICE_FAMILY[sdk=appletv*] = 3
+
+// Watch-specific default settings
+//TARGETED_DEVICE_FAMILY[sdk=watchsimulator*] = 4
+//TARGETED_DEVICE_FAMILY[sdk=watch*] = 4
+
+ENABLE_BITCODE[sdk=macosx*] = NO
+//ENABLE_BITCODE[sdk=watchsimulator*] = YES
+//ENABLE_BITCODE[sdk=watch*] = YES
+ENABLE_BITCODE[sdk=iphonesimulator*] = YES
+ENABLE_BITCODE[sdk=iphone*] = YES
+ENABLE_BITCODE[sdk=appletvsimulator*] = YES
+ENABLE_BITCODE[sdk=appletv*] = YES
@@ -0,0 +1,18 @@
+//
+// Inherit from this config in the test target for your framework.
+//
+// Copyright (c) 2014-2015 Marius Rackwitz. All rights reserved.
+//
+
+#include "UniversalFramework_Base.xcconfig"
+
+FRAMEWORK_SEARCH_PATHS = $(inherited) '$(PLATFORM_DIR)/Developer/Library/Frameworks'
+
+// Yep.
+LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = $(inherited) '@executable_path/../Frameworks' '@loader_path/../Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=watchos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=watchsimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
+LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*] = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
Submodule yoga added at 352f59
Oops, something went wrong.

0 comments on commit b0cd0e7

Please sign in to comment.