Merge pull request #27 from TouchInstinct/fix/template_fixes

Carthage generation added
This commit is contained in:
Pavel 2019-03-05 15:36:52 +03:00 committed by GitHub
commit 97a2caecff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 14 deletions

View File

@ -95,6 +95,10 @@ generate "{project_name: $PROJECT_NAME, deployment_target: $DEPLOYMENT_TARGET}"
pod repo update
pod install
# install carthage
generate "{project_name: $PROJECT_NAME}" $TEMPLATES/Cartfile.mustage Cartfile
carthage update
# configure git files
cp $TEMPLATES/gitignore .gitignore
cp $TEMPLATES/gitattributes .gitattributes

View File

@ -1,2 +1,3 @@
tap "yonaskolb/XcodeGen", "https://github.com/yonaskolb/XcodeGen.git"
brew "XcodeGen"
brew "carthage"

View File

@ -31,5 +31,4 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
Fabric.with([Crashlytics.self])
return true
}
}

View File

@ -0,0 +1,14 @@
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKitAdditions/LeadKitAdditions.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxKeyboard/RxKeyboard.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxOptional/RxOptional.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/PinLayout/PinLayout.json"
binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json"
github "ReactiveX/RxSwift"
github "maxsokolov/TableKit"
github "pronebird/UIScrollView-InfiniteScroll"

View File

@ -14,12 +14,9 @@ project '{{project_name}}', {
}
target '{{project_name}}' do
pod 'LeadKit'
pod 'LeadKitAdditions'
pod 'Fabric'
pod 'Crashlytics'
pod 'SwiftLint'
pod 'RxKeyboard'
end
# If you have slow HDD

View File

@ -12,7 +12,6 @@ enum {{project_name}}DateFormat: String, DateFormat {
var dateToStringFormat: DateToStringStyles {
return .custom(rawValue)
}
}
final class {{project_name}}DateFormattingService: DateFormattingService, Singleton {
@ -26,7 +25,6 @@ final class {{project_name}}DateFormattingService: DateFormattingService, Single
private init() {
//
}
}
extension DateRepresentable {
@ -34,7 +32,6 @@ extension DateRepresentable {
func formatted(as format: {{project_name}}DateFormat) -> String {
return {{project_name}}DateFormattingService.string(from: self, format: format)
}
}
extension String {
@ -42,5 +39,4 @@ extension String {
func asDate(using format: {{project_name}}DateFormat) -> DateInRegion? {
return {{project_name}}DateFormattingService.date(from: self, format: format)
}
}

View File

@ -50,8 +50,8 @@ Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Checkouts
Carthage/Build
# fastlane

View File

@ -32,7 +32,6 @@ final class {{project_name}}NumberFormatter: NumberFormattingService, Singleton
private init() {
//
}
}
// MARK: - Number to string
@ -42,7 +41,6 @@ extension NSNumberConvertible {
func formatted(as format: {{project_name}}NumberFormatType) -> String {
return {{project_name}}NumberFormatter.string(from: asNSNumber(), format: format)
}
}
extension Optional where Wrapped: NSNumberConvertible {
@ -54,7 +52,6 @@ extension Optional where Wrapped: NSNumberConvertible {
}
return defaultString
}
}
// MARK: - String to number
@ -84,5 +81,4 @@ extension String {
func asDouble(using format: {{project_name}}NumberFormatType) -> Double? {
return asNumber(using: format)?.doubleValue
}
}

View File

@ -19,5 +19,4 @@ class {{project_name}}TableContentController<ViewModel>: BaseTableContentControl
view.backgroundColor = .white
tableView.showsVerticalScrollIndicator = false
}
}