From de927055351c17c57106933175f610f30908fadf Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 8 Dec 2015 20:11:10 +0000 Subject: [PATCH] Update README.md --- .gitignore | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 14 +++++++------- 2 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c911a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +# SPM +.build +Packages + +## Obj-C/Swift specific +*.hmap +*.ipa + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/README.md b/README.md index d33f864..c4fef3e 100644 --- a/README.md +++ b/README.md @@ -13,28 +13,28 @@ You get something like this: ```swift // Generated by AssetGen.swift import UIKit -protocol AssetProtocol: RawRepresentable { +protocol AssetGenImageProtocol: RawRepresentable { var image: UIImage { get } } -extension AssetProtocol where RawValue == String { +extension AssetGenImageProtocol where RawValue == String { var image: UIImage { return UIImage(named: rawValue)! } } struct ImageResources { - enum AnotherAssetCatalog: String, AssetProtocol { + enum AnotherAssetCatalog: String, AssetGenImageProtocol { case MuteSelected = "mute selected" } - - enum MyAssetCatalog: String, AssetProtocol { + enum MyAssetCatalog: String, AssetGenImageProtocol { case SomeAsset = "some_asset" - enum AFolder: String, AssetProtocol { + enum AFolder: String, AssetGenImageProtocol { case LinkIcon = "link icon" - } + } } } + ``` That can then be used like this: